commit 9b01da97e3a8f2df9acbd3b86af50e4040e9d914
parent 258355734d3aceb34eb6288ece37d9bbd7f2bc6d
Author: Roberto Ierusalimschy <roberto@inf.puc-rio.br>
Date: Mon, 21 Oct 2024 15:30:08 -0300
Small bug in 'luaE_luaE_statesize'
Plus, function was renamed to 'luaE_threadsize'.
Diffstat:
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lgc.c b/lgc.c
@@ -132,7 +132,7 @@ static size_t objsize (GCObject *o) {
return luaF_protosize(gco2p(o));
}
case LUA_VTHREAD: {
- return luaE_statesize(gco2th(o));
+ return luaE_threadsize(gco2th(o));
}
case LUA_VSHRSTR: {
TString *ts = gco2ts(o);
diff --git a/lstate.c b/lstate.c
@@ -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;
diff --git a/lstate.h b/lstate.h
@@ -416,7 +416,7 @@ union GCUnion {
LUAI_FUNC void luaE_setdebt (global_State *g, l_mem debt);
LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1);
-LUAI_FUNC size_t luaE_statesize (lua_State *L);
+LUAI_FUNC size_t luaE_threadsize (lua_State *L);
LUAI_FUNC CallInfo *luaE_extendCI (lua_State *L);
LUAI_FUNC void luaE_shrinkCI (lua_State *L);
LUAI_FUNC void luaE_checkcstack (lua_State *L);