MCPcopy Create free account
hub / github.com/DFHack/dfhack / luaC_newobj

Function luaC_newobj

depends/lua/src/lgc.c:208–216  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

206** it to 'allgc' list.
207*/
208GCObject *luaC_newobj (lua_State *L, int tt, size_t sz) {
209 global_State *g = G(L);
210 GCObject *o = cast(GCObject *, luaM_newobject(L, novariant(tt), sz));
211 o->marked = luaC_white(g);
212 o->tt = tt;
213 o->next = g->allgc;
214 g->allgc = o;
215 return o;
216}
217
218/* }====================================================== */
219

Callers 6

luaH_newFunction · 0.85
luaF_newCclosureFunction · 0.85
luaF_newLclosureFunction · 0.85
luaF_newprotoFunction · 0.85
createstrobjFunction · 0.85
luaS_newudataFunction · 0.85

Calls 1

castFunction · 0.85

Tested by

no test coverage detected