diff --git a/src/lua/LuaCompat.h b/src/lua/LuaCompat.h index b1db9d7300..307347abbf 100644 --- a/src/lua/LuaCompat.h +++ b/src/lua/LuaCompat.h @@ -25,8 +25,6 @@ extern "C" #endif #if LUA_VERSION_NUM >= 502 -#define luaL_getn(L,i) lua_rawlen(L, (i)) - LUALIB_API int (luaL_typerror) (lua_State *L, int narg, const char *tname); #else LUALIB_API void (lua_pushglobaltable) (lua_State *L); diff --git a/src/lua/LuaScriptInterface.cpp b/src/lua/LuaScriptInterface.cpp index 0aca14767a..73d7db5319 100644 --- a/src/lua/LuaScriptInterface.cpp +++ b/src/lua/LuaScriptInterface.cpp @@ -2230,8 +2230,8 @@ int LuaScriptInterface::renderer_renderModes(lua_State * l) { int size = 0; luaL_checktype(l, 1, LUA_TTABLE); - size = luaL_getn(l, 1); - + size = lua_objlen(l, 1); + std::vector renderModes; for(int i = 1; i <= size; i++) { @@ -2263,8 +2263,8 @@ int LuaScriptInterface::renderer_displayModes(lua_State * l) { int size = 0; luaL_checktype(l, 1, LUA_TTABLE); - size = luaL_getn(l, 1); - + size = lua_objlen(l, 1); + std::vector displayModes; for(int i = 1; i <= size; i++) {