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

github.com/torch/image.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:40:46 +0300
committerSoumith Chintala <soumith@fb.com>2016-02-04 02:40:46 +0300
commit3ecdaf25e6239a71b135faee154f5eb6f571a645 (patch)
tree93f8e5b0706d98f18430e45988267838305184c0
parente749114fe15a09f5e02584282de6a97d788d364c (diff)
lua 5.3 fixeslua53
-rw-r--r--image.c5
-rw-r--r--jpeg.c5
-rw-r--r--png.c4
3 files changed, 14 insertions, 0 deletions
diff --git a/image.c b/image.c
index 1305063..5cb43cf 100644
--- a/image.c
+++ b/image.c
@@ -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)
diff --git a/jpeg.c b/jpeg.c
index 8c87e01..d36f221 100644
--- a/jpeg.c
+++ b/jpeg.c
@@ -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)
diff --git a/png.c b/png.c
index 2034639..e69eee0 100644
--- a/png.c
+++ b/png.c
@@ -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>