aboutsummaryrefslogtreecommitdiff
path: root/src/lua.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua.h')
-rw-r--r--src/lua.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lua.h b/src/lua.h
index cc7a37f..47d6757 100644
--- a/src/lua.h
+++ b/src/lua.h
@@ -79,7 +79,7 @@ int writer(lua_State*, const void*, size_t, void*);
#define lua_objlen(L,i) lua_rawlen(L,(i))
#define luaL_register(L, M, F) luaL_newlib(L, F);
-#elif LUA_VERSION_NUM = 501
+#elif LUA_VERSION_NUM == 501
#define luaL_tolstring lua_tolstring
#define lua_dump(A, B, C, D) lua_dump(A, B, C)
@@ -87,6 +87,8 @@ int writer(lua_State*, const void*, size_t, void*);
#define lua_rawlen lua_objlen
#define lua_gc(A, B) lua_gc(A, B, 0)
+
+ #define lua_pushglobaltable(L) {lua_getglobal(L, "_G");}
#endif