diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-12 16:14:06 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-03-12 16:14:06 -0300 |
commit | 25c557ec6367870c127e879cce8ed8fa21f34398 (patch) | |
tree | 37d322402a8163145a0f3a5728f98115402f352f /lbaselib.c | |
parent | f292760f12022a83cf01e788482a264aeeb3c276 (diff) | |
download | lua-25c557ec6367870c127e879cce8ed8fa21f34398.tar.gz lua-25c557ec6367870c127e879cce8ed8fa21f34398.tar.bz2 lua-25c557ec6367870c127e879cce8ed8fa21f34398.zip |
first version of _ENV; no more global variables
Diffstat (limited to 'lbaselib.c')
-rw-r--r-- | lbaselib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lbaselib.c,v 1.234 2009/12/22 15:32:50 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.235 2009/12/28 16:30:31 roberto Exp roberto $ |
3 | ** Basic library | 3 | ** Basic library |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -376,7 +376,7 @@ static int luaB_loadin (lua_State *L) { | |||
376 | n = luaB_load_aux(L, 2); | 376 | n = luaB_load_aux(L, 2); |
377 | if (n == 1) { /* success? */ | 377 | if (n == 1) { /* success? */ |
378 | lua_pushvalue(L, 1); /* environment for loaded function */ | 378 | lua_pushvalue(L, 1); /* environment for loaded function */ |
379 | lua_setfenv(L, -2); | 379 | lua_setupvalue(L, -2, 1); |
380 | } | 380 | } |
381 | return n; | 381 | return n; |
382 | } | 382 | } |