From 22ef84b6c8d980eb869f414610f8ff5f25568ca7 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Sat, 13 Mar 2010 12:55:42 -0300 Subject: '_ENV' name permanently stored in global state for easier access --- ldebug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 898efe53..08560acd 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.65 2010/03/05 14:01:29 roberto Exp roberto $ +** $Id: ldebug.c,v 2.66 2010/03/12 19:14:06 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -304,7 +304,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 = (tabname && strcmp(tabname, "_ENV") == 0) ? "global" : "field"; + what = (tabname == getstr(G(L)->envn)) ? "global" : "field"; } break; } -- cgit v1.2.3-55-g6feb