mirror of
https://github.com/lua/lua
synced 2024-12-03 18:02:24 +03:00
Small bug in 'luaE_luaE_statesize'
Plus, function was renamed to 'luaE_threadsize'.
This commit is contained in:
parent
258355734d
commit
9b01da97e3
2
lgc.c
2
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);
|
||||
|
4
lstate.c
4
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;
|
||||
|
2
lstate.h
2
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);
|
||||
|
Loading…
Reference in New Issue
Block a user