diff options
author | Philipp Janda <siffiejoe@gmx.net> | 2015-02-14 17:37:37 +0100 |
---|---|---|
committer | Philipp Janda <siffiejoe@gmx.net> | 2015-02-14 17:37:37 +0100 |
commit | 893bac7a0dbb6aab8216eab45188050f52937290 (patch) | |
tree | 174371b60b1df0e935dcf42f7e3fc5017318915c | |
parent | f26591c9948818a50285003b5e00afd15f872fea (diff) | |
download | lua-compat-5.3-893bac7a0dbb6aab8216eab45188050f52937290.tar.gz lua-compat-5.3-893bac7a0dbb6aab8216eab45188050f52937290.tar.bz2 lua-compat-5.3-893bac7a0dbb6aab8216eab45188050f52937290.zip |
make LuaJIT support for luaL_Stream interface possible
-rw-r--r-- | c-api/compat-5.3.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h index f40f2ff..87d5dfb 100644 --- a/c-api/compat-5.3.h +++ b/c-api/compat-5.3.h | |||
@@ -73,6 +73,13 @@ | |||
73 | 73 | ||
74 | typedef struct luaL_Stream { | 74 | typedef struct luaL_Stream { |
75 | FILE *f; | 75 | FILE *f; |
76 | /* The following field is for LuaJIT which adds a uint32_t field | ||
77 | * to file handles. */ | ||
78 | #if INT_MAX > 2147483640L | ||
79 | unsigned int type; | ||
80 | #else | ||
81 | unsigned long type; | ||
82 | #endif | ||
76 | lua_CFunction closef; | 83 | lua_CFunction closef; |
77 | } luaL_Stream; | 84 | } luaL_Stream; |
78 | 85 | ||