diff options
-rw-r--r-- | liolib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 2.7 2002/06/05 17:24:04 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.8 2002/06/05 17:42:03 roberto Exp roberto $ |
3 | ** Standard I/O (and system) library | 3 | ** Standard I/O (and system) library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -99,12 +99,12 @@ static int setnewfile (lua_State *L, FILE *f) { | |||
99 | 99 | ||
100 | static int io_close (lua_State *L) { | 100 | static int io_close (lua_State *L) { |
101 | FILE *f; | 101 | FILE *f; |
102 | int status = 1; | ||
102 | if (lua_isnone(L, 1)) { | 103 | if (lua_isnone(L, 1)) { |
103 | lua_pushstring(L, IO_OUTPUT); | 104 | lua_pushstring(L, IO_OUTPUT); |
104 | lua_rawget(L, lua_upvalueindex(1)); | 105 | lua_rawget(L, lua_upvalueindex(1)); |
105 | } | 106 | } |
106 | f = tofile(L, 1); | 107 | f = tofile(L, 1); |
107 | int status = 1; | ||
108 | if (f != stdin && f != stdout && f != stderr) { | 108 | if (f != stdin && f != stdout && f != stderr) { |
109 | lua_settop(L, 1); /* make sure file is on top */ | 109 | lua_settop(L, 1); /* make sure file is on top */ |
110 | lua_pushliteral(L, CLOSEDFILEHANDLE); | 110 | lua_pushliteral(L, CLOSEDFILEHANDLE); |