From c0a59dda383c37fdeb786de7b3fc4e58e2ab886d Mon Sep 17 00:00:00 2001 From: daurnimator Date: Fri, 8 Sep 2017 18:24:30 +1000 Subject: Add (partial) luaL_Stream definition --- c-api/compat-5.3.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'c-api') 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 { } luaL_Buffer_53; #define luaL_Buffer luaL_Buffer_53 +/* + * In PUC-Rio 5.1, userdata is a simple FILE* + * In LuaJIT, it's a struct where the first member is a FILE* + * We can't support the `closef` member + */ +typedef struct luaL_Stream { + FILE *f; +} luaL_Stream; + #define lua_absindex COMPAT53_CONCAT(COMPAT53_PREFIX, _absindex) COMPAT53_API int lua_absindex (lua_State *L, int i); -- cgit v1.2.3-55-g6feb