diff options
Diffstat (limited to 'c-api')
| -rw-r--r-- | c-api/compat-5.3.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h index 6c76930..a5b10d2 100644 --- a/c-api/compat-5.3.h +++ b/c-api/compat-5.3.h | |||
| @@ -87,6 +87,9 @@ extern "C" { | |||
| 87 | #ifndef LUA_OPLE | 87 | #ifndef LUA_OPLE |
| 88 | # define LUA_OPLE 2 | 88 | # define LUA_OPLE 2 |
| 89 | #endif | 89 | #endif |
| 90 | #ifndef LUA_FILEHANDLE | ||
| 91 | # define LUA_FILEHANDLE "FILE*" | ||
| 92 | #endif | ||
| 90 | 93 | ||
| 91 | /* LuaJIT/Lua 5.1 does not have the updated | 94 | /* LuaJIT/Lua 5.1 does not have the updated |
| 92 | * error codes for thread status/function returns (but some patched versions do) | 95 | * error codes for thread status/function returns (but some patched versions do) |
| @@ -112,6 +115,15 @@ typedef struct luaL_Buffer_53 { | |||
| 112 | } luaL_Buffer_53; | 115 | } luaL_Buffer_53; |
| 113 | #define luaL_Buffer luaL_Buffer_53 | 116 | #define luaL_Buffer luaL_Buffer_53 |
| 114 | 117 | ||
| 118 | /* | ||
| 119 | * In PUC-Rio 5.1, userdata is a simple FILE* | ||
| 120 | * In LuaJIT, it's a struct where the first member is a FILE* | ||
| 121 | * We can't support the `closef` member | ||
| 122 | */ | ||
| 123 | typedef struct luaL_Stream { | ||
| 124 | FILE *f; | ||
| 125 | } luaL_Stream; | ||
| 126 | |||
| 115 | #define lua_absindex COMPAT53_CONCAT(COMPAT53_PREFIX, _absindex) | 127 | #define lua_absindex COMPAT53_CONCAT(COMPAT53_PREFIX, _absindex) |
| 116 | COMPAT53_API int lua_absindex (lua_State *L, int i); | 128 | COMPAT53_API int lua_absindex (lua_State *L, int i); |
| 117 | 129 | ||
