From 0df2238063f3e5b1a12c5272484f2afd45a2a2f1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 7 Sep 2010 16:21:39 -0300 Subject: name "_ENV" configurable through 'luaconf.h' --- lparser.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lparser.c') diff --git a/lparser.c b/lparser.c index c042ddc8..27919b6a 100644 --- a/lparser.c +++ b/lparser.c @@ -1,5 +1,5 @@ /* -** $Id: lparser.c,v 2.90 2010/07/07 16:27:29 roberto Exp roberto $ +** $Id: lparser.c,v 2.91 2010/08/23 17:32:34 roberto Exp roberto $ ** Lua Parser ** See Copyright Notice in lua.h */ @@ -289,7 +289,7 @@ static void singlevar (LexState *ls, expdesc *var) { FuncState *fs = ls->fs; if (singlevaraux(fs, varname, var, 1) == VVOID) { /* global name? */ expdesc key; - singlevaraux(fs, ls->envn, var, 1); /* get _ENV variable */ + singlevaraux(fs, ls->envn, var, 1); /* get environment variable */ lua_assert(var->k == VLOCAL || var->k == VUPVAL); codestring(ls, &key, varname); /* key is variable name */ luaK_indexed(fs, var, &key); /* env[varname] */ @@ -433,14 +433,14 @@ static void close_func (LexState *ls) { /* ** opens the main function, which is a regular vararg function with an -** upvalue named '_ENV' +** upvalue named LUA_ENV */ static void open_mainfunc (LexState *ls, FuncState *fs) { expdesc v; open_func(ls, fs); fs->f->is_vararg = 1; /* main function is always vararg */ init_exp(&v, VLOCAL, 0); - newupvalue(fs, ls->envn, &v); /* create '_ENV' upvalue */ + newupvalue(fs, ls->envn, &v); /* create environment upvalue */ } -- cgit v1.2.3-55-g6feb