diff options
Diffstat (limited to 'lstate.c')
-rw-r--r-- | lstate.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -258,7 +258,7 @@ static void preinit_thread (lua_State *L, global_State *g) { | |||
258 | 258 | ||
259 | static void close_state (lua_State *L) { | 259 | static void close_state (lua_State *L) { |
260 | global_State *g = G(L); | 260 | global_State *g = G(L); |
261 | luaF_close(L, L->stack); /* close all upvalues for this thread */ | 261 | luaF_close(L, L->stack, -1); /* close all upvalues for this thread */ |
262 | luaC_freeallobjects(L); /* collect all objects */ | 262 | luaC_freeallobjects(L); /* collect all objects */ |
263 | if (ttisnil(&g->nilvalue)) /* closing a fully built state? */ | 263 | if (ttisnil(&g->nilvalue)) /* closing a fully built state? */ |
264 | luai_userstateclose(L); | 264 | luai_userstateclose(L); |
@@ -301,7 +301,7 @@ LUA_API lua_State *lua_newthread (lua_State *L) { | |||
301 | 301 | ||
302 | void luaE_freethread (lua_State *L, lua_State *L1) { | 302 | void luaE_freethread (lua_State *L, lua_State *L1) { |
303 | LX *l = fromstate(L1); | 303 | LX *l = fromstate(L1); |
304 | luaF_close(L1, L1->stack); /* close all upvalues for this thread */ | 304 | luaF_close(L1, L1->stack, -1); /* close all upvalues for this thread */ |
305 | lua_assert(L1->openupval == NULL); | 305 | lua_assert(L1->openupval == NULL); |
306 | luai_userstatefree(L, L1); | 306 | luai_userstatefree(L, L1); |
307 | freestack(L1); | 307 | freestack(L1); |