summaryrefslogtreecommitdiff
path: root/lstate.h
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-02-18 10:39:37 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-02-18 10:39:37 -0300
commitd764cc552251fc69207c1bb4b34d3a6a5b7020c6 (patch)
tree7b1b6532af3d22da36118cc81b8256ab53b887bc /lstate.h
parentffa96d988d60f31591014fe417c27e44fc3116d1 (diff)
downloadlua-d764cc552251fc69207c1bb4b34d3a6a5b7020c6.tar.gz
lua-d764cc552251fc69207c1bb4b34d3a6a5b7020c6.tar.bz2
lua-d764cc552251fc69207c1bb4b34d3a6a5b7020c6.zip
new list 'twups' to allow traversal of upvalues from dead threads
(+ fixed some problems with cycles involving those upvalues)
Diffstat (limited to 'lstate.h')
-rw-r--r--lstate.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/lstate.h b/lstate.h
index 4acdee84..9df36f32 100644
--- a/lstate.h
+++ b/lstate.h
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.h,v 2.99 2014/02/13 12:11:34 roberto Exp roberto $ 2** $Id: lstate.h,v 2.100 2014/02/13 14:46:38 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*/
@@ -124,6 +124,7 @@ typedef struct global_State {
124 GCObject *allweak; /* list of all-weak tables */ 124 GCObject *allweak; /* list of all-weak tables */
125 GCObject *tobefnz; /* list of userdata to be GC */ 125 GCObject *tobefnz; /* list of userdata to be GC */
126 GCObject *fixedgc; /* list of objects not to be collected */ 126 GCObject *fixedgc; /* list of objects not to be collected */
127 struct lua_State *twups; /* list of threads with open upvalues */
127 Mbuffer buff; /* temporary buffer for string concatenation */ 128 Mbuffer buff; /* temporary buffer for string concatenation */
128 unsigned int gcfinnum; /* number of finalizers to call in each GC step */ 129 unsigned int gcfinnum; /* number of finalizers to call in each GC step */
129 int gcpause; /* size of pause between successive GCs */ 130 int gcpause; /* size of pause between successive GCs */
@@ -159,6 +160,7 @@ struct lua_State {
159 lua_Hook hook; 160 lua_Hook hook;
160 UpVal *openupval; /* list of open upvalues in this stack */ 161 UpVal *openupval; /* list of open upvalues in this stack */
161 GCObject *gclist; 162 GCObject *gclist;
163 struct lua_State *twups; /* list of threads with open upvalues */
162 struct lua_longjmp *errorJmp; /* current error recover point */ 164 struct lua_longjmp *errorJmp; /* current error recover point */
163 ptrdiff_t errfunc; /* current error handling function (stack index) */ 165 ptrdiff_t errfunc; /* current error handling function (stack index) */
164 CallInfo base_ci; /* CallInfo for first level (C calling Lua) */ 166 CallInfo base_ci; /* CallInfo for first level (C calling Lua) */