Small bug in 'luaE_luaE_statesize'

Plus, function was renamed to 'luaE_threadsize'.
This commit is contained in:
Roberto Ierusalimschy
2024-10-21 15:30:35 -03:00
parent 258355734d
commit 9b01da97e3
3 changed files with 4 additions and 4 deletions

View File

@@ -257,8 +257,8 @@ static void preinit_thread (lua_State *L, global_State *g) {
}
size_t luaE_statesize (lua_State *L) {
size_t sz = sizeof(LG) + cast_uint(L->nci) * sizeof(CallInfo);
size_t luaE_threadsize (lua_State *L) {
size_t sz = sizeof(LX) + cast_uint(L->nci) * sizeof(CallInfo);
if (L->stack.p != NULL)
sz += cast_uint(stacksize(L) + EXTRA_STACK) * sizeof(StackValue);
return sz;