diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-01-11 18:26:52 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2002-01-11 18:26:52 -0200 |
commit | d56d4cf776b2a874e35d7a92c506840f4a2051b6 (patch) | |
tree | 873e9d729b589749aa207916dd1c42843154ce63 /lgc.c | |
parent | b7ae43d457ca7b5a46ca768f482b334d70897a14 (diff) | |
download | lua-d56d4cf776b2a874e35d7a92c506840f4a2051b6.tar.gz lua-d56d4cf776b2a874e35d7a92c506840f4a2051b6.tar.bz2 lua-d56d4cf776b2a874e35d7a92c506840f4a2051b6.zip |
distinct functions to create/destroy states and threads
Diffstat (limited to 'lgc.c')
-rw-r--r-- | lgc.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -126,6 +126,12 @@ static void markstacks (GCState *st) { | |||
126 | lua_State *L1 = st->L; | 126 | lua_State *L1 = st->L; |
127 | do { /* for each thread */ | 127 | do { /* for each thread */ |
128 | StkId o, lim; | 128 | StkId o, lim; |
129 | if (L1->base_ci == NULL) { /* incomplete state? */ | ||
130 | lua_assert(L1 != st->L); | ||
131 | L1 = L1->next; | ||
132 | luaE_closethread(st->L, L1->previous); /* collect it */ | ||
133 | continue; | ||
134 | } | ||
129 | for (o=L1->stack; o<L1->top; o++) | 135 | for (o=L1->stack; o<L1->top; o++) |
130 | markobject(st, o); | 136 | markobject(st, o); |
131 | lim = (L1->stack_last - L1->ci->base > MAXSTACK) ? L1->ci->base+MAXSTACK | 137 | lim = (L1->stack_last - L1->ci->base > MAXSTACK) ? L1->ci->base+MAXSTACK |