diff --git a/src/common/runtime.cpp b/src/common/runtime.cpp index 8ee32ee39..e7ba8bd9a 100644 --- a/src/common/runtime.cpp +++ b/src/common/runtime.cpp @@ -645,7 +645,7 @@ extern "C" int luax_typerror(lua_State *L, int narg, const char *tname) return luaL_argerror(L, narg, msg); } -int luax_objlen(lua_State *L, int ndx) +size_t luax_objlen(lua_State *L, int ndx) { #if LUA_VERSION_NUM == 501 return lua_objlen(L, ndx); diff --git a/src/common/runtime.h b/src/common/runtime.h index 9868ff6d7..f0facdeee 100644 --- a/src/common/runtime.h +++ b/src/common/runtime.h @@ -397,7 +397,7 @@ extern "C" { // Also called from luasocket /** * Calls luax_objlen/lua_rawlen depending on version **/ -int luax_objlen(lua_State *L, int ndx); +size_t luax_objlen(lua_State *L, int ndx); extern "C" { // Called by enet and luasocket void luax_register(lua_State *L, const char *name, const luaL_Reg *l);