Struct 'transferinfo' moved to "lua_State"

That reduces the size of "CallInfo". Moreover, bit CIST_HOOKED from
call status is not needed. When in a hook, 'transferinfo' is always
valid, being zero when the hook is not call/return.
This commit is contained in:
Roberto Ierusalimschy
2024-07-30 10:16:19 -03:00
parent f2206b2abe
commit 4c6afbcb01
3 changed files with 16 additions and 24 deletions

View File

@@ -364,11 +364,11 @@ static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar,
break;
}
case 'r': {
if (ci == NULL || !(ci->callstatus & CIST_TRAN))
if (ci == NULL || !(ci->callstatus & CIST_HOOKED))
ar->ftransfer = ar->ntransfer = 0;
else {
ar->ftransfer = ci->u2.transferinfo.ftransfer;
ar->ntransfer = ci->u2.transferinfo.ntransfer;
ar->ftransfer = L->transferinfo.ftransfer;
ar->ntransfer = L->transferinfo.ntransfer;
}
break;
}