diff options
Diffstat (limited to 'util-src/table.c')
-rw-r--r-- | util-src/table.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/util-src/table.c b/util-src/table.c index 4bbceedb..ade019c4 100644 --- a/util-src/table.c +++ b/util-src/table.c @@ -6,10 +6,6 @@ #define LUA_MAXINTEGER PTRDIFF_MAX #endif -#if (LUA_VERSION_NUM > 501) -#define lua_equal(L, A, B) lua_compare(L, A, B, LUA_OPEQ) -#endif - static int Lcreate_table(lua_State *L) { lua_createtable(L, luaL_checkinteger(L, 1), luaL_checkinteger(L, 2)); return 1; @@ -47,7 +43,7 @@ static int Lmove (lua_State *L) { n = e - f + 1; /* number of elements to move */ luaL_argcheck(L, t <= LUA_MAXINTEGER - n + 1, 4, "destination wrap around"); - if (t > e || t <= f || (tt != 1 && !lua_equal(L, 1, tt))) { + if (t > e || t <= f || (tt != 1 && !lua_compare(L, 1, tt, LUA_OPEQ))) { for (i = 0; i < n; i++) { lua_rawgeti(L, 1, f + i); lua_rawseti(L, tt, t + i); @@ -65,9 +61,7 @@ static int Lmove (lua_State *L) { } int luaopen_util_table(lua_State *L) { -#if (LUA_VERSION_NUM > 501) luaL_checkversion(L); -#endif lua_createtable(L, 0, 2); lua_pushcfunction(L, Lcreate_table); lua_setfield(L, -2, "create"); |