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 /lbaselib.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 '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.247 2010/08/23 18:03:11 roberto Exp roberto $ | 2 | ** $Id: lbaselib.c,v 1.248 2010/09/03 14:14:01 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 | */ |
@@ -336,7 +336,7 @@ static int luaB_loadin (lua_State *L) { | |||
336 | const char *name; | 336 | const char *name; |
337 | lua_pushvalue(L, 1); /* environment for loaded function */ | 337 | lua_pushvalue(L, 1); /* environment for loaded function */ |
338 | name = lua_setupvalue(L, -2, 1); | 338 | name = lua_setupvalue(L, -2, 1); |
339 | if (name == NULL || strcmp(name, "_ENV") != 0) | 339 | if (name == NULL || strcmp(name, LUA_ENV) != 0) |
340 | luaL_error(L, "loaded chunk does not have environment upvalue"); | 340 | luaL_error(L, "loaded chunk does not have environment upvalue"); |
341 | } | 341 | } |
342 | return n; | 342 | return n; |