diff options
-rw-r--r-- | lib/init.c | 6 | ||||
-rw-r--r-- | lib/luaTHRD.h | 2 |
2 files changed, 7 insertions, 1 deletions
@@ -17,6 +17,12 @@ static void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup) } #endif +#if LUA_VERSION_NUM >= 503 +#define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) +#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) +#endif + + #include "threads.c" #include "queue.c" diff --git a/lib/luaTHRD.h b/lib/luaTHRD.h index 23acdf0..d17e75e 100644 --- a/lib/luaTHRD.h +++ b/lib/luaTHRD.h @@ -1,7 +1,7 @@ #ifndef LUA_THRD_INC #define LUA_THRD_INC -#if (LUA_VERSION_NUM == 502) +#if (LUA_VERSION_NUM >= 502) #define lua_equal(L, idx1, idx2) lua_compare(L, (idx1), (idx2), LUA_OPEQ) #endif |