MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / luaC_newobj

Function luaC_newobj

3rd/lua-5.4.3/src/lgc.c:258–266  ·  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

256** it to 'allgc' list.
257*/
258GCObject *luaC_newobj (lua_State *L, int tt, size_t sz) {
259 global_State *g = G(L);
260 GCObject *o = cast(GCObject *, luaM_newobject(L, novariant(tt), sz));
261 o->marked = luaC_white(g);
262 o->tt = tt;
263 o->next = g->allgc;
264 g->allgc = o;
265 return o;
266}
267
268/* }====================================================== */
269

Callers 8

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

Calls

no outgoing calls

Tested by

no test coverage detected