aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-08-23 14:24:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2011-08-23 14:24:34 -0300
commit3dc5475e239e2da52a380288ae8b293a6b019f81 (patch)
tree3da13bd67407f9717b5fb9a024dca38b78589bfc /lstate.c
parent8a008a20579dd6818cb770147c8765b72eb2acfe (diff)
downloadlua-3dc5475e239e2da52a380288ae8b293a6b019f81.tar.gz
lua-3dc5475e239e2da52a380288ae8b293a6b019f81.tar.bz2
lua-3dc5475e239e2da52a380288ae8b293a6b019f81.zip
'nCcalls' should be local to each thread, as each thread may have its
own C stack (with LuaThreads or something similar)
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstate.c b/lstate.c
index 506af472..64b03dc1 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 2.89 2010/12/20 19:40:07 roberto Exp roberto $ 2** $Id: lstate.c,v 2.90 2011/08/09 20:58: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*/
@@ -171,6 +171,7 @@ static void preinit_state (lua_State *L, global_State *g) {
171 L->ci = NULL; 171 L->ci = NULL;
172 L->stacksize = 0; 172 L->stacksize = 0;
173 L->errorJmp = NULL; 173 L->errorJmp = NULL;
174 L->nCcalls = 0;
174 L->hook = NULL; 175 L->hook = NULL;
175 L->hookmask = 0; 176 L->hookmask = 0;
176 L->basehookcount = 0; 177 L->basehookcount = 0;
@@ -237,7 +238,6 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
237 g->currentwhite = bit2mask(WHITE0BIT, FIXEDBIT); 238 g->currentwhite = bit2mask(WHITE0BIT, FIXEDBIT);
238 L->marked = luaC_white(g); 239 L->marked = luaC_white(g);
239 g->gckind = KGC_NORMAL; 240 g->gckind = KGC_NORMAL;
240 g->nCcalls = 0;
241 preinit_state(L, g); 241 preinit_state(L, g);
242 g->frealloc = f; 242 g->frealloc = f;
243 g->ud = ud; 243 g->ud = ud;