Skip to content

Commit

Permalink
Fix Py_DEBUG builds
Browse files Browse the repository at this point in the history
  • Loading branch information
mdboom committed Mar 21, 2024
1 parent 4169667 commit 881c4e1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Python/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1384,7 +1384,11 @@ expand_region_transitively_reachable(PyGC_Head *container, PyGC_Head *gc, GCStat
static void
completed_cycle(GCState *gcstate)
{
#ifdef Py_DEBUG
PyGC_Head *not_visited = &gcstate->old[gcstate->visited_space^1].head;
assert(gc_list_is_empty(not_visited));
#endif

gcstate->visited_space = flip_old_space(gcstate->visited_space);
if (gcstate->work_to_do > 0) {
gcstate->work_to_do = 0;
Expand Down

0 comments on commit 881c4e1

Please sign in to comment.