void PyObject_GC_Del(void *op) { PyGC_Head *g = AS_GC(op); if (IS_TRACKED(op)) gc_list_remove(g); if (generations[0].count > 0) { generations[0].count--; } PyObject_FREE(g); }
static gbg_node_t *gc_list_move( gbg_collector_t *gc, gbg_node_t *node, unsigned color ){ gbg_node_t *ret = node; if ( node->status < 3 ){ gc_list_remove( gc, node ); gc_list_add( gc, node, color ); } else { printf( "[%s] Invalid move request\n", __func__ ); printf( "\tToken color: %u, token: %p, next: %p, token gc: %u, gc id: %u\n", node->status, (void *)node, (void *)node->next, 1, gc->id ); } return ret; }