** create a new collectable object (with given type, size, and offset) ** and link it to 'allgc' list. */
| 295 | ** and link it to 'allgc' list. |
| 296 | */ |
| 297 | GCObject *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 | /* |
no outgoing calls
no test coverage detected