diff options
-rw-r--r-- | liolib.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: liolib.c,v 2.71 2006/01/17 13:54:02 roberto Exp roberto $ | 2 | ** $Id: liolib.c,v 2.72 2006/01/28 12:59:13 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,7 +99,7 @@ static FILE **newfile (lua_State *L) { | |||
99 | static int io_pclose (lua_State *L) { | 99 | static int io_pclose (lua_State *L) { |
100 | FILE **p = topfile(L); | 100 | FILE **p = topfile(L); |
101 | int ok = lua_pclose(L, *p); | 101 | int ok = lua_pclose(L, *p); |
102 | if (ok) *p = NULL; | 102 | *p = NULL; |
103 | return pushresult(L, ok, NULL); | 103 | return pushresult(L, ok, NULL); |
104 | } | 104 | } |
105 | 105 | ||
@@ -107,7 +107,7 @@ static int io_pclose (lua_State *L) { | |||
107 | static int io_fclose (lua_State *L) { | 107 | static int io_fclose (lua_State *L) { |
108 | FILE **p = topfile(L); | 108 | FILE **p = topfile(L); |
109 | int ok = (fclose(*p) == 0); | 109 | int ok = (fclose(*p) == 0); |
110 | if (ok) *p = NULL; | 110 | *p = NULL; |
111 | return pushresult(L, ok, NULL); | 111 | return pushresult(L, ok, NULL); |
112 | } | 112 | } |
113 | 113 | ||