Permalink
Browse files

fix use of deprecated luaL_getn function

  • Loading branch information...
jacob1 committed Nov 24, 2017
1 parent c2064b4 commit 63c13bda89e96175271991a8be6faa0d7fe3a062
Showing with 4 additions and 6 deletions.
  1. +0 −2 src/lua/LuaCompat.h
  2. +4 −4 src/lua/LuaScriptInterface.cpp
@@ -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);
@@ -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++)
{
@@ -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++)
{

0 comments on commit 63c13bd

Please sign in to comment.