fix use of deprecated luaL_getn function

This commit is contained in:
jacob1 2017-11-23 22:34:22 -05:00
parent c2064b48c3
commit 63c13bda89
2 changed files with 4 additions and 6 deletions

View File

@ -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);

View File

@ -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++)
{