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

Function luaC_newobjdt

third-party/lua-5.5.0/src/lgc.c:297–306  ·  view source on GitHub ↗

** create a new collectable object (with given type, size, and offset) ** and link it to 'allgc' list. */

Source from the content-addressed store, hash-verified

295** and link it to 'allgc' list.
296*/
297GCObject *luaC_newobjdt (lua_State *L, lu_byte tt, size_t sz, size_t offset) {
298 global_State *g = G(L);
299 char *p = cast_charp(luaM_newobject(L, novariant(tt), sz));
300 GCObject *o = cast(GCObject *, p + offset);
301 o->marked = luaC_white(g);
302 o->tt = tt;
303 o->next = g->allgc;
304 g->allgc = o;
305 return o;
306}
307
308
309/*

Callers 2

lua_newthreadFunction · 0.70
luaC_newobjFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected