Ensure the correct number of arguments have been provided. * Pad with nil to allow other functions to simply check arg[i] * to find whether an argument was provided */
| 257 | * Pad with nil to allow other functions to simply check arg[i] |
| 258 | * to find whether an argument was provided */ |
| 259 | static json_config_t *json_arg_init(lua_State *l, int args) |
| 260 | { |
| 261 | luaL_argcheck(l, lua_gettop(l) <= args, args + 1, |
| 262 | "found too many arguments"); |
| 263 | |
| 264 | while (lua_gettop(l) < args) |
| 265 | lua_pushnil(l); |
| 266 | |
| 267 | return json_fetch_config(l); |
| 268 | } |
| 269 | |
| 270 | /* Process integer options for configuration functions */ |
| 271 | static int json_integer_option(lua_State *l, int optindex, int *setting, |
no test coverage detected