diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-06 09:43:08 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-06-06 09:43:08 -0300 |
| commit | e3cddc950cc84755437e3c2302d12f6c3fcb691b (patch) | |
| tree | 1c8300c3b8e303e3cba44b2d803435465f5f78c4 | |
| parent | 630acb204869f367e31a57d850b3669f49430064 (diff) | |
| download | lua-e3cddc950cc84755437e3c2302d12f6c3fcb691b.tar.gz lua-e3cddc950cc84755437e3c2302d12f6c3fcb691b.tar.bz2 lua-e3cddc950cc84755437e3c2302d12f6c3fcb691b.zip | |
C is not C++...
| -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); |
