diff options
author | Soumith Chintala <soumith@fb.com> | 2016-02-04 02:40:46 +0300 |
---|---|---|
committer | Soumith Chintala <soumith@fb.com> | 2016-02-04 02:40:46 +0300 |
commit | 3ecdaf25e6239a71b135faee154f5eb6f571a645 (patch) | |
tree | 93f8e5b0706d98f18430e45988267838305184c0 | |
parent | e749114fe15a09f5e02584282de6a97d788d364c (diff) |
lua 5.3 fixeslua53
-rw-r--r-- | image.c | 5 | ||||
-rw-r--r-- | jpeg.c | 5 | ||||
-rw-r--r-- | png.c | 4 |
3 files changed, 14 insertions, 0 deletions
@@ -2,6 +2,11 @@ #include <TH.h> #include <luaT.h> +#if LUA_VERSION_NUM >= 503 +#define luaL_checklong(L,n) ((long)luaL_checkinteger(L, (n))) +#endif + + #define torch_(NAME) TH_CONCAT_3(torch_, Real, NAME) #define torch_Tensor TH_CONCAT_STRING_3(torch., Real, Tensor) #define image_(NAME) TH_CONCAT_3(image_, Real, NAME) @@ -4,6 +4,11 @@ #include <jpeglib.h> #include <setjmp.h> +#if LUA_VERSION_NUM >= 503 +#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) +#endif + + #define torch_(NAME) TH_CONCAT_3(torch_, Real, NAME) #define torch_Tensor TH_CONCAT_STRING_3(torch., Real, Tensor) #define libjpeg_(NAME) TH_CONCAT_3(libjpeg_, Real, NAME) @@ -6,6 +6,10 @@ #include <string.h> #include <assert.h> +#if LUA_VERSION_NUM >= 503 +#define luaL_checkint(L,n) ((int)luaL_checkinteger(L, (n))) +#endif + #define PNG_DEBUG 3 #include <png.h> |