From 3dc5475e239e2da52a380288ae8b293a6b019f81 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 23 Aug 2011 14:24:34 -0300 Subject: 'nCcalls' should be local to each thread, as each thread may have its own C stack (with LuaThreads or something similar) --- lstate.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lstate.h') diff --git a/lstate.h b/lstate.h index 606bb669..fb757373 100644 --- a/lstate.h +++ b/lstate.h @@ -1,5 +1,5 @@ /* -** $Id: lstate.h,v 2.71 2010/12/20 19:40:07 roberto Exp roberto $ +** $Id: lstate.h,v 2.72 2011/06/02 19:31:40 roberto Exp roberto $ ** Global State ** See Copyright Notice in lua.h */ @@ -118,7 +118,6 @@ typedef struct global_State { lu_mem lastmajormem; /* memory in use after last major collection */ stringtable strt; /* hash table for strings */ TValue l_registry; - unsigned short nCcalls; /* number of nested C calls */ lu_byte currentwhite; lu_byte gcstate; /* state of garbage collector */ lu_byte gckind; /* kind of GC running */ @@ -161,6 +160,7 @@ struct lua_State { StkId stack; /* stack base */ int stacksize; unsigned short nny; /* number of non-yieldable calls in stack */ + unsigned short nCcalls; /* number of nested C calls */ lu_byte hookmask; lu_byte allowhook; int basehookcount; -- cgit v1.2.3-55-g6feb