aboutsummaryrefslogtreecommitdiff
path: root/lstate.c
diff options
context:
space:
mode:
Diffstat (limited to 'lstate.c')
-rw-r--r--lstate.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lstate.c b/lstate.c
index 7f6475a8..6c35ea1a 100644
--- a/lstate.c
+++ b/lstate.c
@@ -233,7 +233,8 @@ static void init_registry (lua_State *L, global_State *g) {
233 233
234/* 234/*
235** open parts of the state that may cause memory-allocation errors. 235** open parts of the state that may cause memory-allocation errors.
236** ('ttisnil(&g->nilvalue)'' flags that the state was completely build) 236** ('g->nilvalue' being a nil value flags that the state was completely
237** build.)
237*/ 238*/
238static void f_luaopen (lua_State *L, void *ud) { 239static void f_luaopen (lua_State *L, void *ud) {
239 global_State *g = G(L); 240 global_State *g = G(L);
@@ -386,6 +387,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) {
386 g->twups = NULL; 387 g->twups = NULL;
387 g->totalbytes = sizeof(LG); 388 g->totalbytes = sizeof(LG);
388 g->GCdebt = 0; 389 g->GCdebt = 0;
390 g->lastatomic = 0;
389 setivalue(&g->nilvalue, 0); /* to signal that state is not yet built */ 391 setivalue(&g->nilvalue, 0); /* to signal that state is not yet built */
390 setgcparam(g->gcpause, LUAI_GCPAUSE); 392 setgcparam(g->gcpause, LUAI_GCPAUSE);
391 setgcparam(g->gcstepmul, LUAI_GCMUL); 393 setgcparam(g->gcstepmul, LUAI_GCMUL);