diff options
author | daurnimator <quae@daurnimator.com> | 2017-09-08 18:24:30 +1000 |
---|---|---|
committer | daurnimator <quae@daurnimator.com> | 2017-09-08 18:24:30 +1000 |
commit | c0a59dda383c37fdeb786de7b3fc4e58e2ab886d (patch) | |
tree | d153c872d4f5a7a2bdb4db12f69df193976c7579 /c-api | |
parent | c0db566ba0a42d5beebce46ba1af9273c85d7536 (diff) | |
download | lua-compat-5.3-c0a59dda383c37fdeb786de7b3fc4e58e2ab886d.tar.gz lua-compat-5.3-c0a59dda383c37fdeb786de7b3fc4e58e2ab886d.tar.bz2 lua-compat-5.3-c0a59dda383c37fdeb786de7b3fc4e58e2ab886d.zip |
Add (partial) luaL_Stream definition
Diffstat (limited to 'c-api')
-rw-r--r-- | c-api/compat-5.3.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/c-api/compat-5.3.h b/c-api/compat-5.3.h index 886b5ba..02712f3 100644 --- a/c-api/compat-5.3.h +++ b/c-api/compat-5.3.h | |||
@@ -102,6 +102,15 @@ typedef struct luaL_Buffer_53 { | |||
102 | } luaL_Buffer_53; | 102 | } luaL_Buffer_53; |
103 | #define luaL_Buffer luaL_Buffer_53 | 103 | #define luaL_Buffer luaL_Buffer_53 |
104 | 104 | ||
105 | /* | ||
106 | * In PUC-Rio 5.1, userdata is a simple FILE* | ||
107 | * In LuaJIT, it's a struct where the first member is a FILE* | ||
108 | * We can't support the `closef` member | ||
109 | */ | ||
110 | typedef struct luaL_Stream { | ||
111 | FILE *f; | ||
112 | } luaL_Stream; | ||
113 | |||
105 | #define lua_absindex COMPAT53_CONCAT(COMPAT53_PREFIX, _absindex) | 114 | #define lua_absindex COMPAT53_CONCAT(COMPAT53_PREFIX, _absindex) |
106 | COMPAT53_API int lua_absindex (lua_State *L, int i); | 115 | COMPAT53_API int lua_absindex (lua_State *L, int i); |
107 | 116 | ||