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

Function udata2finalize

3rd/lua-5.4.3/src/lgc.c:878–890  ·  view source on GitHub ↗

** Get the next udata to be finalized from the 'tobefnz' list, and ** link it back into the 'allgc' list. */

Source from the content-addressed store, hash-verified

876** link it back into the 'allgc' list.
877*/
878static GCObject *udata2finalize (global_State *g) {
879 GCObject *o = g->tobefnz; /* get first element */
880 lua_assert(tofinalize(o));
881 g->tobefnz = o->next; /* remove it from 'tobefnz' list */
882 o->next = g->allgc; /* return it to 'allgc' list */
883 g->allgc = o;
884 resetbit(o->marked, FINALIZEDBIT); /* object is "normal" again */
885 if (issweepphase(g))
886 makewhite(g, o); /* "sweep" object */
887 else if (getage(o) == G_OLD1)
888 g->firstold1 = o; /* it is the first OLD1 object in the list */
889 return o;
890}
891
892
893static void dothecall (lua_State *L, void *ud) {

Callers 1

GCTMFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected