Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/threads-ffi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSoumith Chintala <soumith@fb.com>2016-02-04 02:45:30 +0300
committerSoumith Chintala <soumith@fb.com>2016-02-04 02:45:30 +0300
commit6151aca5954735379c7b5113fb45f8f43ef84ad8 (patch)
tree091b1f031315c4965d6f59912d1f5f10b73ffd5c
parent311571f1b7b04eebec152723a282870e23cee237 (diff)
lua 5.3 fixeslua53
-rw-r--r--lib/init.c6
-rw-r--r--lib/luaTHRD.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/lib/init.c b/lib/init.c
index 4e9bed6..318004d 100644
--- a/lib/init.c
+++ b/lib/init.c
@@ -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