This commit is contained in:
Artem Serebriyskiy 2013-11-08 13:20:20 +04:00
commit 9d6cd75c73
6 changed files with 12 additions and 8 deletions

View file

@ -70,6 +70,10 @@ extern "C" {
# define lua_pushglobaltable(L) lua_pushvalue(L, LUA_GLOBALSINDEX)
#endif
/* lua_absindex was introduced in Lua 5.2 */
#if !defined(LUA_VERSION_NUM) || LUA_VERSION_NUM < 502
# define lua_absindex(L,i) ((i)>0 || (i) <= LUA_REGISTRYINDEX ? (i) : lua_gettop(L) + (i) + 1)
#endif
/* --------------------------------------------------------------------------
* Helper functions for error handling