| 192 | /* ===== CONFIGURATION ===== */ |
| 193 | |
| 194 | static json_config_t *json_fetch_config(lua_State *l) |
| 195 | { |
| 196 | json_config_t *cfg; |
| 197 | |
| 198 | cfg = lua_touserdata(l, lua_upvalueindex(1)); |
| 199 | if (!cfg) |
| 200 | luaL_error(l, "BUG: Unable to fetch CJSON configuration"); |
| 201 | |
| 202 | return cfg; |
| 203 | } |
| 204 | |
| 205 | /* Ensure the correct number of arguments have been provided. |
| 206 | * Pad with nil to allow other functions to simply check arg[i] |
no test coverage detected