aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
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 92ccbf9b..c708a162 100644
--- a/lstate.c
+++ b/lstate.c
@@ -253,6 +253,7 @@ static void preinit_thread (lua_State *L, global_State *g) {
253 L->ci = NULL; 253 L->ci = NULL;
254 L->nci = 0; 254 L->nci = 0;
255 L->twups = L; /* thread has no upvalues */ 255 L->twups = L; /* thread has no upvalues */
256 L->nCcalls = 0;
256 L->errorJmp = NULL; 257 L->errorJmp = NULL;
257 L->hook = NULL; 258 L->hook = NULL;
258 L->hookmask = 0; 259 L->hookmask = 0;
@@ -263,6 +264,7 @@ static void preinit_thread (lua_State *L, global_State *g) {
263 L->status = LUA_OK; 264 L->status = LUA_OK;
264 L->errfunc = 0; 265 L->errfunc = 0;
265 L->oldpc = 0; 266 L->oldpc = 0;
267 L->ptbc = NULL;
266} 268}
267 269
268 270
@@ -296,7 +298,6 @@ LUA_API lua_State *lua_newthread (lua_State *L) {
296 setthvalue2s(L, L->top, L1); 298 setthvalue2s(L, L->top, L1);
297 api_incr_top(L); 299 api_incr_top(L);
298 preinit_thread(L1, g); 300 preinit_thread(L1, g);
299 L1->nCcalls = 0;
300 L1->hookmask = L->hookmask; 301 L1->hookmask = L->hookmask;
301 L1->basehookcount = L->basehookcount; 302 L1->basehookcount = L->basehookcount;
302 L1->hook = L->hook; 303 L1->hook = L->hook;
@@ -363,7 +364,6 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
363 preinit_thread(L, g); 364 preinit_thread(L, g);
364 g->allgc = obj2gco(L); /* by now, only object is the main thread */ 365 g->allgc = obj2gco(L); /* by now, only object is the main thread */
365 L->next = NULL; 366 L->next = NULL;
366 L->nCcalls = 0;
367 incnny(L); /* main thread is always non yieldable */ 367 incnny(L); /* main thread is always non yieldable */
368 g->frealloc = f; 368 g->frealloc = f;
369 g->ud = ud; 369 g->ud = ud;