aboutsummaryrefslogtreecommitdiff
path: root/liolib.c
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2024-08-29 17:16:49 -0300
committerGitHub <noreply@github.com>2024-08-29 17:16:49 -0300
commit7a82c38437075cb2beb2fe7c6453aa91e019d6b7 (patch)
tree4b77c7e02eb1e6e5f2b875f7a5947b4fdf23c0f5 /liolib.c
parent1c679a282bf1255cddfbb6b3e8c5c72d9ebe57e8 (diff)
downloadlua-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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/liolib.c b/liolib.c
index 8a9e75c..7f425c1 100644
--- a/liolib.c
+++ b/liolib.c
@@ -142,7 +142,7 @@ static int l_checkmode (const char *mode) {
142typedef luaL_Stream LStream; 142typedef 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