MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / json_fetch_config

Function json_fetch_config

deps/lua/src/lua_cjson.c:194–203  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192/* ===== CONFIGURATION ===== */
193
194static 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]

Callers 3

json_arg_initFunction · 0.85
json_encodeFunction · 0.85
json_decodeFunction · 0.85

Calls 2

lua_touserdataFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected