aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-06 09:43:08 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2002-06-06 09:43:08 -0300
commite3cddc950cc84755437e3c2302d12f6c3fcb691b (patch)
tree1c8300c3b8e303e3cba44b2d803435465f5f78c4
parent630acb204869f367e31a57d850b3669f49430064 (diff)
downloadlua-e3cddc950cc84755437e3c2302d12f6c3fcb691b.tar.gz
lua-e3cddc950cc84755437e3c2302d12f6c3fcb691b.tar.bz2
lua-e3cddc950cc84755437e3c2302d12f6c3fcb691b.zip
C is not C++...
-rw-r--r--liolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liolib.c b/liolib.c
index f2445b71..f73aa9bf 100644
--- a/liolib.c
+++ b/liolib.c
@@ -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
100static int io_close (lua_State *L) { 100static 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);