fix use of deprecated luaL_getn function
This commit is contained in:
parent
c2064b48c3
commit
63c13bda89
@ -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++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user