diff options
Diffstat (limited to '')
| -rw-r--r-- | lstate.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.c,v 1.127 2003/10/02 20:31:17 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 1.128 2003/11/18 14:55:11 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 | */ |
| @@ -112,7 +112,7 @@ static void preinit_state (lua_State *L) { | |||
| 112 | static void close_state (lua_State *L) { | 112 | static void close_state (lua_State *L) { |
| 113 | global_State *g = G(L); | 113 | global_State *g = G(L); |
| 114 | luaF_close(L, L->stack); /* close all upvalues for this thread */ | 114 | luaF_close(L, L->stack); /* close all upvalues for this thread */ |
| 115 | luaC_sweep(L, 1); /* collect all elements */ | 115 | luaC_sweepall(L); /* collect all elements */ |
| 116 | lua_assert(g->rootgc == NULL); | 116 | lua_assert(g->rootgc == NULL); |
| 117 | lua_assert(g->rootudata == NULL); | 117 | lua_assert(g->rootudata == NULL); |
| 118 | luaS_freeall(L); | 118 | luaS_freeall(L); |
| @@ -165,6 +165,7 @@ LUA_API lua_State *lua_newstate (lua_Alloc f, void *ud) { | |||
| 165 | setnilvalue(registry(L)); | 165 | setnilvalue(registry(L)); |
| 166 | luaZ_initbuffer(L, &g->buff); | 166 | luaZ_initbuffer(L, &g->buff); |
| 167 | g->panic = NULL; | 167 | g->panic = NULL; |
| 168 | g->gcstate = 0; | ||
| 168 | g->rootgc = NULL; | 169 | g->rootgc = NULL; |
| 169 | g->rootudata = NULL; | 170 | g->rootudata = NULL; |
| 170 | g->gray = NULL; | 171 | g->gray = NULL; |
