diff options
-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> |