Small bug in 'luaE_luaE_statesize'
Plus, function was renamed to 'luaE_threadsize'.
This commit is contained in:
2
lgc.c
2
lgc.c
@@ -132,7 +132,7 @@ static size_t objsize (GCObject *o) {
|
|||||||
return luaF_protosize(gco2p(o));
|
return luaF_protosize(gco2p(o));
|
||||||
}
|
}
|
||||||
case LUA_VTHREAD: {
|
case LUA_VTHREAD: {
|
||||||
return luaE_statesize(gco2th(o));
|
return luaE_threadsize(gco2th(o));
|
||||||
}
|
}
|
||||||
case LUA_VSHRSTR: {
|
case LUA_VSHRSTR: {
|
||||||
TString *ts = gco2ts(o);
|
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 luaE_threadsize (lua_State *L) {
|
||||||
size_t sz = sizeof(LG) + cast_uint(L->nci) * sizeof(CallInfo);
|
size_t sz = sizeof(LX) + cast_uint(L->nci) * sizeof(CallInfo);
|
||||||
if (L->stack.p != NULL)
|
if (L->stack.p != NULL)
|
||||||
sz += cast_uint(stacksize(L) + EXTRA_STACK) * sizeof(StackValue);
|
sz += cast_uint(stacksize(L) + EXTRA_STACK) * sizeof(StackValue);
|
||||||
return sz;
|
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_setdebt (global_State *g, l_mem debt);
|
||||||
LUAI_FUNC void luaE_freethread (lua_State *L, lua_State *L1);
|
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 CallInfo *luaE_extendCI (lua_State *L);
|
||||||
LUAI_FUNC void luaE_shrinkCI (lua_State *L);
|
LUAI_FUNC void luaE_shrinkCI (lua_State *L);
|
||||||
LUAI_FUNC void luaE_checkcstack (lua_State *L);
|
LUAI_FUNC void luaE_checkcstack (lua_State *L);
|
||||||
|
|||||||
Reference in New Issue
Block a user