summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lstate.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lstate.c b/lstate.c
index ed40bee7..8da02ed5 100644
--- a/lstate.c
+++ b/lstate.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lstate.c,v 2.34 2005/09/20 17:55:53 roberto Exp roberto $ 2** $Id: lstate.c,v 2.35 2005/10/06 20:46:25 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*/
@@ -198,7 +198,6 @@ static void callallgcTM (lua_State *L, void *ud) {
198 198
199LUA_API void lua_close (lua_State *L) { 199LUA_API void lua_close (lua_State *L) {
200 L = G(L)->mainthread; /* only the main thread can be closed */ 200 L = G(L)->mainthread; /* only the main thread can be closed */
201 luai_userstateclose(L);
202 lua_lock(L); 201 lua_lock(L);
203 luaF_close(L, L->stack); /* close all upvalues for this thread */ 202 luaF_close(L, L->stack); /* close all upvalues for this thread */
204 luaC_separateudata(L, 1); /* separate udata that have GC metamethods */ 203 luaC_separateudata(L, 1); /* separate udata that have GC metamethods */
@@ -209,6 +208,7 @@ LUA_API void lua_close (lua_State *L) {
209 L->nCcalls = 0; 208 L->nCcalls = 0;
210 } while (luaD_rawrunprotected(L, callallgcTM, NULL) != 0); 209 } while (luaD_rawrunprotected(L, callallgcTM, NULL) != 0);
211 lua_assert(G(L)->tmudata == NULL); 210 lua_assert(G(L)->tmudata == NULL);
211 luai_userstateclose(L);
212 close_state(L); 212 close_state(L);
213} 213}
214 214