From 5bc91c640588ca77b9f84146fc88fcc9bdbfbcd1 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 23 Oct 2009 17:12:19 -0200 Subject: no more one environment per thread: all threads share a single global environment --- lstate.h | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 2ddffaf1..dcceefe1 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.45 2009/06/18 18:59:18 roberto Exp roberto $ +** $Id: lstate.h,v 2.46 2009/07/15 17:26:14 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -44,12 +44,6 @@ struct lua_longjmp; /* defined in ldo.c */ -/* table of globals */ -#define gt(L) (&L->l_gt) - -/* registry */ -#define registry(L) (&G(L)->l_registry) - /* extra stack space to handle TM calls and some other extras */ #define EXTRA_STACK 5 @@ -146,6 +140,7 @@ typedef struct global_State { int gcstepmul; /* GC `granularity' */ lua_CFunction panic; /* to be called in unprotected errors */ TValue l_registry; + TValue l_gt; /* table of globals */ struct lua_State *mainthread; UpVal uvhead; /* head of double-linked list of all open upvalues */ const lua_Number *version; /* pointer to version number */ @@ -173,7 +168,6 @@ struct lua_State { int basehookcount; int hookcount; lua_Hook hook; - TValue l_gt; /* table of globals */ TValue env; /* temporary place for environments */ GCObject *openupval; /* list of open upvalues in this stack */ GCObject *gclist; -- cgit v1.2.3-55-g6feb