MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaF_protosize

Function luaF_protosize

third-party/lua-5.5.0/src/lfunc.c:270–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

268
269
270lu_mem luaF_protosize (Proto *p) {
271 lu_mem sz = cast(lu_mem, sizeof(Proto))
272 + cast_uint(p->sizep) * sizeof(Proto*)
273 + cast_uint(p->sizek) * sizeof(TValue)
274 + cast_uint(p->sizelocvars) * sizeof(LocVar)
275 + cast_uint(p->sizeupvalues) * sizeof(Upvaldesc);
276 if (!(p->flag & PF_FIXED)) {
277 sz += cast_uint(p->sizecode) * sizeof(Instruction);
278 sz += cast_uint(p->sizelineinfo) * sizeof(lu_byte);
279 sz += cast_uint(p->sizeabslineinfo) * sizeof(AbsLineInfo);
280 }
281 return sz;
282}
283
284
285void luaF_freeproto (lua_State *L, Proto *f) {

Callers 1

objsizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected