diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-09-07 16:21:39 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-09-07 16:21:39 -0300 |
commit | 0df2238063f3e5b1a12c5272484f2afd45a2a2f1 (patch) | |
tree | 04361bb15edb5dbeba28ecd0103a0f29807112ad /lapi.c | |
parent | 6828f6d42786de735d6696da8cccbb47c8bad347 (diff) | |
download | lua-0df2238063f3e5b1a12c5272484f2afd45a2a2f1.tar.gz lua-0df2238063f3e5b1a12c5272484f2afd45a2a2f1.tar.bz2 lua-0df2238063f3e5b1a12c5272484f2afd45a2a2f1.zip |
name "_ENV" configurable through 'luaconf.h'
Diffstat (limited to 'lapi.c')
-rw-r--r-- | lapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lapi.c,v 2.134 2010/08/04 18:40:28 roberto Exp roberto $ | 2 | ** $Id: lapi.c,v 2.135 2010/09/03 14:14:01 roberto Exp roberto $ |
3 | ** Lua API | 3 | ** Lua API |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -891,7 +891,7 @@ LUA_API int lua_load (lua_State *L, lua_Reader reader, void *data, | |||
891 | /* get global table from registry */ | 891 | /* get global table from registry */ |
892 | Table *reg = hvalue(&G(L)->l_registry); | 892 | Table *reg = hvalue(&G(L)->l_registry); |
893 | const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS); | 893 | const TValue *gt = luaH_getint(reg, LUA_RIDX_GLOBALS); |
894 | /* set global table as 1st upvalue of 'f' (may be _ENV) */ | 894 | /* set global table as 1st upvalue of 'f' (may be LUA_ENV) */ |
895 | setobj(L, f->l.upvals[0]->v, gt); | 895 | setobj(L, f->l.upvals[0]->v, gt); |
896 | luaC_barrier(L, f->l.upvals[0], gt); | 896 | luaC_barrier(L, f->l.upvals[0], gt); |
897 | } | 897 | } |