diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-06 17:46:25 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-10-06 17:46:25 -0300 |
| commit | d31c04c0498bd78a99a15fc8980844da6882914d (patch) | |
| tree | 3e68c58768ef75e134560d3abf8cd59ec48eaf1b | |
| parent | 522481a788ee33d68389e0e32f498b7a3e304d39 (diff) | |
| download | lua-d31c04c0498bd78a99a15fc8980844da6882914d.tar.gz lua-d31c04c0498bd78a99a15fc8980844da6882914d.tar.bz2 lua-d31c04c0498bd78a99a15fc8980844da6882914d.zip | |
missing macros 'luai_userstate*'
| -rw-r--r-- | lstate.c | 6 |
1 files changed, 4 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lstate.c,v 2.33 2005/08/25 15:39:16 roberto Exp roberto $ | 2 | ** $Id: lstate.c,v 2.34 2005/09/20 17:55:53 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 | */ |
| @@ -134,6 +134,7 @@ lua_State *luaE_newthread (lua_State *L) { | |||
| 134 | void luaE_freethread (lua_State *L, lua_State *L1) { | 134 | void luaE_freethread (lua_State *L, lua_State *L1) { |
| 135 | luaF_close(L1, L1->stack); /* close all upvalues for this thread */ | 135 | luaF_close(L1, L1->stack); /* close all upvalues for this thread */ |
| 136 | lua_assert(L1->openupval == NULL); | 136 | lua_assert(L1->openupval == NULL); |
| 137 | luai_userstatefree(L1); | ||
| 137 | freestack(L, L1); | 138 | freestack(L, L1); |
| 138 | luaM_freemem(L, fromstate(L1), state_size(lua_State)); | 139 | luaM_freemem(L, fromstate(L1), state_size(lua_State)); |
| 139 | } | 140 | } |
| @@ -196,8 +197,9 @@ static void callallgcTM (lua_State *L, void *ud) { | |||
| 196 | 197 | ||
| 197 | 198 | ||
| 198 | LUA_API void lua_close (lua_State *L) { | 199 | LUA_API void lua_close (lua_State *L) { |
| 199 | lua_lock(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 | luaF_close(L, L->stack); /* close all upvalues for this thread */ | 203 | luaF_close(L, L->stack); /* close all upvalues for this thread */ |
| 202 | luaC_separateudata(L, 1); /* separate udata that have GC metamethods */ | 204 | luaC_separateudata(L, 1); /* separate udata that have GC metamethods */ |
| 203 | L->errfunc = 0; /* no error function during GC metamethods */ | 205 | L->errfunc = 0; /* no error function during GC metamethods */ |
