diff options
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.c,v 2.140 2017/05/26 19:14:29 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.141 2017/06/29 15:06:44 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 | */ |
@@ -320,9 +320,11 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { | |||
320 | g->twups = NULL; | 320 | g->twups = NULL; |
321 | g->totalbytes = sizeof(LG); | 321 | g->totalbytes = sizeof(LG); |
322 | g->GCdebt = 0; | 322 | g->GCdebt = 0; |
323 | g->gcpause = LUAI_GCPAUSE; | 323 | setgcparam(g->gcpause, LUAI_GCPAUSE); |
324 | g->gcstepmul = LUAI_GCMUL; | 324 | setgcparam(g->gcstepmul, LUAI_GCMUL); |
325 | g->gcstepsize = LUAI_GCSTEPSIZE; | 325 | g->gcstepsize = LUAI_GCSTEPSIZE; |
326 | setgcparam(g->genmajormul, LUAI_GENMAJORMUL); | ||
327 | g->genminormul = LUAI_GENMINORMUL; | ||
326 | for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; | 328 | for (i=0; i < LUA_NUMTAGS; i++) g->mt[i] = NULL; |
327 | if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { | 329 | if (luaD_rawrunprotected(L, f_luaopen, NULL) != LUA_OK) { |
328 | /* memory allocation error: free partial state */ | 330 | /* memory allocation error: free partial state */ |