diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-10-23 17:12:19 -0200 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2009-10-23 17:12:19 -0200 |
| commit | 5bc91c640588ca77b9f84146fc88fcc9bdbfbcd1 (patch) | |
| tree | d5d049ad2357648cabe25c19a8620566e9f27131 /lstate.h | |
| parent | f5073de0a72562e1998f23052715e56a3b9fde18 (diff) | |
| download | lua-5bc91c640588ca77b9f84146fc88fcc9bdbfbcd1.tar.gz lua-5bc91c640588ca77b9f84146fc88fcc9bdbfbcd1.tar.bz2 lua-5bc91c640588ca77b9f84146fc88fcc9bdbfbcd1.zip | |
no more one environment per thread: all threads share a single global
environment
Diffstat (limited to 'lstate.h')
| -rw-r--r-- | lstate.h | 10 |
1 files changed, 2 insertions, 8 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.h,v 2.45 2009/06/18 18:59:18 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.46 2009/07/15 17:26:14 roberto Exp roberto $ |
| 3 | ** Global State | 3 | ** Global State |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -44,12 +44,6 @@ | |||
| 44 | struct lua_longjmp; /* defined in ldo.c */ | 44 | struct lua_longjmp; /* defined in ldo.c */ |
| 45 | 45 | ||
| 46 | 46 | ||
| 47 | /* table of globals */ | ||
| 48 | #define gt(L) (&L->l_gt) | ||
| 49 | |||
| 50 | /* registry */ | ||
| 51 | #define registry(L) (&G(L)->l_registry) | ||
| 52 | |||
| 53 | 47 | ||
| 54 | /* extra stack space to handle TM calls and some other extras */ | 48 | /* extra stack space to handle TM calls and some other extras */ |
| 55 | #define EXTRA_STACK 5 | 49 | #define EXTRA_STACK 5 |
| @@ -146,6 +140,7 @@ typedef struct global_State { | |||
| 146 | int gcstepmul; /* GC `granularity' */ | 140 | int gcstepmul; /* GC `granularity' */ |
| 147 | lua_CFunction panic; /* to be called in unprotected errors */ | 141 | lua_CFunction panic; /* to be called in unprotected errors */ |
| 148 | TValue l_registry; | 142 | TValue l_registry; |
| 143 | TValue l_gt; /* table of globals */ | ||
| 149 | struct lua_State *mainthread; | 144 | struct lua_State *mainthread; |
| 150 | UpVal uvhead; /* head of double-linked list of all open upvalues */ | 145 | UpVal uvhead; /* head of double-linked list of all open upvalues */ |
| 151 | const lua_Number *version; /* pointer to version number */ | 146 | const lua_Number *version; /* pointer to version number */ |
| @@ -173,7 +168,6 @@ struct lua_State { | |||
| 173 | int basehookcount; | 168 | int basehookcount; |
| 174 | int hookcount; | 169 | int hookcount; |
| 175 | lua_Hook hook; | 170 | lua_Hook hook; |
| 176 | TValue l_gt; /* table of globals */ | ||
| 177 | TValue env; /* temporary place for environments */ | 171 | TValue env; /* temporary place for environments */ |
| 178 | GCObject *openupval; /* list of open upvalues in this stack */ | 172 | GCObject *openupval; /* list of open upvalues in this stack */ |
| 179 | GCObject *gclist; | 173 | GCObject *gclist; |
