aboutsummaryrefslogtreecommitdiff
path: root/lua_cjson.c
diff options
context:
space:
mode:
Diffstat (limited to 'lua_cjson.c')
-rw-r--r--lua_cjson.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/lua_cjson.c b/lua_cjson.c
index 0662414..118ca27 100644
--- a/lua_cjson.c
+++ b/lua_cjson.c
@@ -1382,13 +1382,8 @@ int luaopen_cjson(lua_State *l)
1382{ 1382{
1383 lua_cjson_new(l); 1383 lua_cjson_new(l);
1384 1384
1385#if !defined(DISABLE_CJSON_GLOBAL) && (!defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502) 1385#ifdef ENABLE_CJSON_GLOBAL
1386 /* Register a global "cjson" table to maintain compatibility with earlier 1386 /* Register a global "cjson" table. */
1387 * versions of Lua CJSON which used luaL_register() under Lua 5.1.
1388 *
1389 * From Lua 5.2 onwards, Lua CJSON does not automatically register a global
1390 * table.
1391 */
1392 lua_pushvalue(l, -1); 1387 lua_pushvalue(l, -1);
1393 lua_setglobal(l, CJSON_MODNAME); 1388 lua_setglobal(l, CJSON_MODNAME);
1394#endif 1389#endif