aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lstate.c b/lstate.c
index c9aebcba..30ff3cbd 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 2.36 2006/05/24 14:15:50 roberto Exp roberto $ 2** $Id: lstate.c,v 2.37 2006/07/11 15:53:29 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*/
@@ -94,7 +94,7 @@ static void preinit_state (lua_State *L, global_State *g) {
94 resethookcount(L); 94 resethookcount(L);
95 L->openupval = NULL; 95 L->openupval = NULL;
96 L->size_ci = 0; 96 L->size_ci = 0;
97 L->nCcalls = 0; 97 L->baseCcalls = 0;
98 L->status = 0; 98 L->status = 0;
99 L->base_ci = L->ci = NULL; 99 L->base_ci = L->ci = NULL;
100 L->savedpc = NULL; 100 L->savedpc = NULL;
@@ -161,6 +161,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
161 g->currentwhite = bit2mask(WHITE0BIT, FIXEDBIT); 161 g->currentwhite = bit2mask(WHITE0BIT, FIXEDBIT);
162 L->marked = luaC_white(g); 162 L->marked = luaC_white(g);
163 g->emergencygc = 0; 163 g->emergencygc = 0;
164 g->nCcalls = 0;
164 set2bits(L->marked, FIXEDBIT, SFIXEDBIT); 165 set2bits(L->marked, FIXEDBIT, SFIXEDBIT);
165 preinit_state(L, g); 166 preinit_state(L, g);
166 g->frealloc = f; 167 g->frealloc = f;
@@ -214,7 +215,7 @@ LUA_API void lua_close (lua_State *L) {
214 do { /* repeat until no more errors */ 215 do { /* repeat until no more errors */
215 L->ci = L->base_ci; 216 L->ci = L->base_ci;
216 L->base = L->top = L->ci->base; 217 L->base = L->top = L->ci->base;
217 L->nCcalls = 0; 218 G(L)->nCcalls = 0;
218 } while (luaD_rawrunprotected(L, callallgcTM, NULL) != 0); 219 } while (luaD_rawrunprotected(L, callallgcTM, NULL) != 0);
219 lua_assert(G(L)->tmudata == NULL); 220 lua_assert(G(L)->tmudata == NULL);
220 luai_userstateclose(L); 221 luai_userstateclose(L);