diff options
author | Soumith Chintala <soumith@gmail.com> | 2016-02-04 02:46:52 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@gmail.com> | 2016-02-04 02:46:52 +0300 |
commit | 9e31123db00c8c8c437a3cba744576456de38731 (patch) | |
tree | 091b1f031315c4965d6f59912d1f5f10b73ffd5c | |
parent | 311571f1b7b04eebec152723a282870e23cee237 (diff) | |
parent | 6151aca5954735379c7b5113fb45f8f43ef84ad8 (diff) |
Merge pull request #48 from torch/lua53
lua 5.3 fixes
-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 |