| 203 | /* ===== CONFIGURATION ===== */ |
| 204 | |
| 205 | static json_config_t *json_fetch_config(lua_State *l) |
| 206 | { |
| 207 | json_config_t *cfg; |
| 208 | |
| 209 | cfg = (json_config_t *)lua_touserdata(l, lua_upvalueindex(1)); |
| 210 | if (!cfg) |
| 211 | luaL_error(l, "BUG: Unable to fetch CJSON configuration"); |
| 212 | |
| 213 | return cfg; |
| 214 | } |
| 215 | |
| 216 | /* Ensure the correct number of arguments have been provided. |
| 217 | * Pad with nil to allow other functions to simply check arg[i] |
no test coverage detected