MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / luaC_newobjdt

Function luaC_newobjdt

lib/lua/src/lgc.c:258–267  ·  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

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

Callers 2

lua_newthreadFunction · 0.85
luaC_newobjFunction · 0.85

Calls 1

GFunction · 0.50

Tested by

no test coverage detected