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' --- lbaselib.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lbaselib.c') diff --git a/lbaselib.c b/lbaselib.c index b8dc6b50..e3fc8d8b 100644 --- a/lbaselib.c +++ b/lbaselib.c @@ -1,5 +1,5 @@ /* -** $Id: lbaselib.c,v 1.247 2010/08/23 18:03:11 roberto Exp roberto $ +** $Id: lbaselib.c,v 1.248 2010/09/03 14:14:01 roberto Exp roberto $ ** Basic library ** See Copyright Notice in lua.h */ @@ -336,7 +336,7 @@ static int luaB_loadin (lua_State *L) { const char *name; lua_pushvalue(L, 1); /* environment for loaded function */ name = lua_setupvalue(L, -2, 1); - if (name == NULL || strcmp(name, "_ENV") != 0) + if (name == NULL || strcmp(name, LUA_ENV) != 0) luaL_error(L, "loaded chunk does not have environment upvalue"); } return n; -- cgit v1.2.3-55-g6feb