From e3cddc950cc84755437e3c2302d12f6c3fcb691b Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 6 Jun 2002 09:43:08 -0300 Subject: C is not C++... --- liolib.c | 4 ++-- 1 file 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 @@ /* -** $Id: liolib.c,v 2.7 2002/06/05 17:24:04 roberto Exp roberto $ +** $Id: liolib.c,v 2.8 2002/06/05 17:42:03 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -99,12 +99,12 @@ static int setnewfile (lua_State *L, FILE *f) { static int io_close (lua_State *L) { FILE *f; + int status = 1; if (lua_isnone(L, 1)) { lua_pushstring(L, IO_OUTPUT); lua_rawget(L, lua_upvalueindex(1)); } f = tofile(L, 1); - int status = 1; if (f != stdin && f != stdout && f != stderr) { lua_settop(L, 1); /* make sure file is on top */ lua_pushliteral(L, CLOSEDFILEHANDLE); -- cgit v1.2.3-55-g6feb