Skip to content

Commit

Permalink
fix use of deprecated luaL_getn function
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob1 committed Nov 24, 2017
1 parent c2064b4 commit 63c13bd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/lua/LuaCompat.h
Expand Up @@ -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);
Expand Down
8 changes: 4 additions & 4 deletions src/lua/LuaScriptInterface.cpp
Expand Up @@ -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<unsigned int> renderModes;
for(int i = 1; i <= size; i++)
{
Expand Down Expand Up @@ -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<unsigned int> displayModes;
for(int i = 1; i <= size; i++)
{
Expand Down

0 comments on commit 63c13bd

Please sign in to comment.