From 064e406f67c0153999a5246deb1d616b06ee9bb0 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 26 Mar 2010 17:58:11 -0300 Subject: no more fenvs! --- liolib.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'liolib.c') diff --git a/liolib.c b/liolib.c index fce6b69b..6a290098 100644 --- a/liolib.c +++ b/liolib.c @@ -1,5 +1,5 @@ /* -** $Id: liolib.c,v 2.86 2010/03/03 18:48:57 roberto Exp roberto $ +** $Id: liolib.c,v 2.87 2010/03/17 21:37:37 roberto Exp roberto $ ** Standard I/O (and system) library ** See Copyright Notice in lua.h */ @@ -120,7 +120,7 @@ static FILE **newprefile (lua_State *L) { static FILE **newfile (lua_State *L) { FILE **pf = newprefile(L); lua_pushvalue(L, lua_upvalueindex(1)); /* set upvalue... */ - lua_setfenv(L, -2); /* ... as environment for new file */ + lua_setenv(L, -2); /* ... as environment for new file */ return pf; } @@ -163,7 +163,7 @@ static int io_fclose (lua_State *L) { static int aux_close (lua_State *L) { - lua_getfenv(L, 1); + lua_getenv(L, 1); lua_getfield(L, -1, "__close"); return (lua_tocfunction(L, -1))(L); } @@ -595,7 +595,7 @@ static void createstdfile (lua_State *L, FILE *f, int k, const char *fname) { lua_rawseti(L, 1, k); /* add it to common upvalue */ } lua_pushvalue(L, 3); /* get environment for default files */ - lua_setfenv(L, -2); /* set it as environment for file */ + lua_setenv(L, -2); /* set it as environment for file */ lua_setfield(L, 2, fname); /* add file to module */ } -- cgit v1.2.3-55-g6feb