** create a new collectable object (with given type, size, and offset) ** and link it to 'allgc' list. */
| 256 | ** and link it to 'allgc' list. |
| 257 | */ |
| 258 | GCObject *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 | |
| 270 | GCObject *luaC_newobj (lua_State *L, int tt, size_t sz) { |
no test coverage detected