diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-01-31 11:09:53 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2020-01-31 11:09:53 -0300 |
commit | 46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e (patch) | |
tree | 7e1ae9b55536171511506532a04f4ebe6dc764b0 /liolib.c | |
parent | 69c7139ff88bf26e05d80bf19d0351e5c88d13a3 (diff) | |
download | lua-46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e.tar.gz lua-46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e.tar.bz2 lua-46c3587a6feb28e1ee4a32aabe463b0ecb9e8f5e.zip |
Clearer distinction between types and tags
LUA_T* represents only types; tags (types + Variants) are represented
by LUA_V* constants.
Diffstat (limited to 'liolib.c')
-rw-r--r-- | liolib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -215,7 +215,7 @@ static int f_close (lua_State *L) { | |||
215 | 215 | ||
216 | static int io_close (lua_State *L) { | 216 | static int io_close (lua_State *L) { |
217 | if (lua_isnone(L, 1)) /* no argument? */ | 217 | if (lua_isnone(L, 1)) /* no argument? */ |
218 | lua_getfield(L, LUA_REGISTRYINDEX, IO_OUTPUT); /* use standard output */ | 218 | lua_getfield(L, LUA_REGISTRYINDEX, IO_OUTPUT); /* use default output */ |
219 | return f_close(L); | 219 | return f_close(L); |
220 | } | 220 | } |
221 | 221 | ||
@@ -296,7 +296,7 @@ static FILE *getiofile (lua_State *L, const char *findex) { | |||
296 | lua_getfield(L, LUA_REGISTRYINDEX, findex); | 296 | lua_getfield(L, LUA_REGISTRYINDEX, findex); |
297 | p = (LStream *)lua_touserdata(L, -1); | 297 | p = (LStream *)lua_touserdata(L, -1); |
298 | if (isclosed(p)) | 298 | if (isclosed(p)) |
299 | luaL_error(L, "standard %s file is closed", findex + IOPREF_LEN); | 299 | luaL_error(L, "default %s file is closed", findex + IOPREF_LEN); |
300 | return p->f; | 300 | return p->f; |
301 | } | 301 | } |
302 | 302 | ||