| 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 | } |
no test coverage detected