| 786 | |
| 787 | |
| 788 | static GCObject *udata2finalize (global_State *g) { |
| 789 | GCObject *o = g->tobefnz; /* get first element */ |
| 790 | lua_assert(tofinalize(o)); |
| 791 | g->tobefnz = o->next; /* remove it from 'tobefnz' list */ |
| 792 | o->next = g->allgc; /* return it to 'allgc' list */ |
| 793 | g->allgc = o; |
| 794 | resetbit(o->marked, FINALIZEDBIT); /* object is "normal" again */ |
| 795 | if (issweepphase(g)) |
| 796 | makewhite(g, o); /* "sweep" object */ |
| 797 | return o; |
| 798 | } |
| 799 | |
| 800 | |
| 801 | static void dothecall (lua_State *L, void *ud) { |