aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-07-22 16:35:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1999-07-22 16:35:50 -0300
commit4bbe0679a857727f9d2d172da88f2bb9b0f34cd3 (patch)
tree0c7eeef26a36b8e3504ae2f8d3300833145741b0
parent438598aeea6f602944f116148b0c3d725b563c7f (diff)
downloadlua-4bbe0679a857727f9d2d172da88f2bb9b0f34cd3.tar.gz
lua-4bbe0679a857727f9d2d172da88f2bb9b0f34cd3.tar.bz2
lua-4bbe0679a857727f9d2d172da88f2bb9b0f34cd3.zip
variables _INPUT and _OUTPUT should be read as rawglobal.
-rw-r--r--liolib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/liolib.c b/liolib.c
index edc0f25e..2adc399b 100644
--- a/liolib.c
+++ b/liolib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: liolib.c,v 1.40 1999/05/14 12:24:04 roberto Exp roberto $ 2** $Id: liolib.c,v 1.41 1999/06/23 13:48:39 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*/
@@ -89,7 +89,7 @@ static int ishandle (lua_Object f) {
89 89
90 90
91static FILE *getfilebyname (char *name) { 91static FILE *getfilebyname (char *name) {
92 lua_Object f = lua_getglobal(name); 92 lua_Object f = lua_rawgetglobal(name);
93 if (!ishandle(f)) 93 if (!ishandle(f))
94 luaL_verror("global variable `%.50s' is not a file handle", name); 94 luaL_verror("global variable `%.50s' is not a file handle", name);
95 return lua_getuserdata(f); 95 return lua_getuserdata(f);