name "_ENV" configurable through 'luaconf.h'

This commit is contained in:
Roberto Ierusalimschy
2010-09-07 16:21:39 -03:00
parent 6828f6d427
commit 0df2238063
7 changed files with 23 additions and 15 deletions

View File

@@ -1,5 +1,5 @@
/*
** $Id: ldebug.c,v 2.71 2010/06/16 13:44:36 roberto Exp roberto $
** $Id: ldebug.c,v 2.72 2010/06/21 16:30:12 roberto Exp roberto $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -315,7 +315,7 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int reg,
? luaF_getlocalname(p, t + 1, pc)
: getstr(p->upvalues[t].name);
kname(p, k, a, what, name);
what = (vn && strcmp(vn, "_ENV") == 0) ? "global" : "field";
what = (vn && strcmp(vn, LUA_ENV) == 0) ? "global" : "field";
}
break;
}