mirror of
https://github.com/lua/lua
synced 2026-09-27 00:28:25 +03:00
New type 'TStatus' for thread status/error codes
This commit is contained in:
parent
f7439112a5
commit
d1e677c52b
10 changed files with 56 additions and 46 deletions
5
lfunc.c
5
lfunc.c
|
|
@ -140,7 +140,8 @@ static void checkclosemth (lua_State *L, StkId level) {
|
|||
** the 'level' of the upvalue being closed, as everything after that
|
||||
** won't be used again.
|
||||
*/
|
||||
static void prepcallclosemth (lua_State *L, StkId level, int status, int yy) {
|
||||
static void prepcallclosemth (lua_State *L, StkId level, TStatus status,
|
||||
int yy) {
|
||||
TValue *uv = s2v(level); /* value being closed */
|
||||
TValue *errobj;
|
||||
if (status == CLOSEKTOP)
|
||||
|
|
@ -224,7 +225,7 @@ static void poptbclist (lua_State *L) {
|
|||
** Close all upvalues and to-be-closed variables up to the given stack
|
||||
** level. Return restored 'level'.
|
||||
*/
|
||||
StkId luaF_close (lua_State *L, StkId level, int status, int yy) {
|
||||
StkId luaF_close (lua_State *L, StkId level, TStatus status, int yy) {
|
||||
ptrdiff_t levelrel = savestack(L, level);
|
||||
luaF_closeupval(L, level); /* first, close the upvalues */
|
||||
while (L->tbclist.p >= level) { /* traverse tbc's down to that level */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue