From b2ee662b4621282b137a2a2cf1be13bd60073c5a Mon Sep 17 00:00:00 2001 From: amelia squires Date: Wed, 16 Apr 2025 13:54:00 -0500 Subject: fixes for 5.1 --- src/lua.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/lua.h') 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 -- cgit v1.2.3