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

Function json_decode_descend

deps/lua/src/lua_cjson.c:1121–1133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1119}
1120
1121static void json_decode_descend(lua_State *l, json_parse_t *json, int slots)
1122{
1123 json->current_depth++;
1124
1125 if (json->current_depth <= json->cfg->decode_max_depth &&
1126 lua_checkstack(l, slots)) {
1127 return;
1128 }
1129
1130 strbuf_free(json->tmp);
1131 luaL_error(l, "Found too many nested data structures (%d) at character %d",
1132 json->current_depth, json->ptr - json->data);
1133}
1134
1135static void json_parse_object_context(lua_State *l, json_parse_t *json)
1136{

Callers 2

json_parse_array_contextFunction · 0.85

Calls 3

lua_checkstackFunction · 0.85
strbuf_freeFunction · 0.85
luaL_errorFunction · 0.85

Tested by

no test coverage detected