MCPcopy Create free account
hub / github.com/defold/defold / InitializeJson

Function InitializeJson

engine/script/src/script_json.cpp:215–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 };
214
215 void InitializeJson(lua_State* L)
216 {
217 int top = lua_gettop(L);
218
219 lua_pushvalue(L, LUA_GLOBALSINDEX);
220 luaL_register(L, "json", ScriptJson_methods);
221
222 // From lua_cjson.c in order to do comparisons with the json null character
223 lua_pushlightuserdata(L, NULL);
224 lua_setfield(L, -2, "null");
225
226 lua_pop(L, 2);
227
228 assert(top == lua_gettop(L));
229 }
230}

Callers 1

InitializeFunction · 0.85

Calls 5

lua_gettopFunction · 0.85
lua_pushvalueFunction · 0.85
lua_pushlightuserdataFunction · 0.85
lua_setfieldFunction · 0.85
assertFunction · 0.50

Tested by

no test coverage detected