diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2024-08-29 17:16:49 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-29 17:16:49 -0300 |
commit | 7a82c38437075cb2beb2fe7c6453aa91e019d6b7 (patch) | |
tree | 4b77c7e02eb1e6e5f2b875f7a5947b4fdf23c0f5 /liolib.c | |
parent | 1c679a282bf1255cddfbb6b3e8c5c72d9ebe57e8 (diff) | |
download | lua-compat-5.3-7a82c38437075cb2beb2fe7c6453aa91e019d6b7.tar.gz lua-compat-5.3-7a82c38437075cb2beb2fe7c6453aa91e019d6b7.tar.bz2 lua-compat-5.3-7a82c38437075cb2beb2fe7c6453aa91e019d6b7.zip |
adjust file metatables even in compat53.module mode (#67)
* adjust file metatables even in compat53.module mode
* apply tweaks only to LuaJIT; file:write() only to compat=none
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -142,7 +142,7 @@ static int l_checkmode (const char *mode) { | |||
142 | typedef luaL_Stream LStream; | 142 | typedef luaL_Stream LStream; |
143 | 143 | ||
144 | 144 | ||
145 | #define tolstream(L) ((LStream *)luaL_checkudata(L, 1, LUA_FILEHANDLE)) | 145 | #define tolstream(L) (luaL_checktype(L, 1, LUA_TUSERDATA), (LStream *)lua_touserdata(L, 1)) |
146 | 146 | ||
147 | #define isclosed(p) ((p)->closef == NULL) | 147 | #define isclosed(p) ((p)->closef == NULL) |
148 | 148 | ||