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 8b0219bc..4a2453d1 100644
--- a/lstate.c
+++ b/lstate.c
@@ -258,7 +258,7 @@ static void preinit_thread (lua_State *L, global_State *g) {
258 258
259static void close_state (lua_State *L) { 259static 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
302void luaE_freethread (lua_State *L, lua_State *L1) { 302void 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);