https://github.com/python/cpython/commit/e3ad9003c5af314ae82d4e9f40d9c0375a34149f
commit: e3ad9003c5af314ae82d4e9f40d9c0375a34149f
branch: main
author: Abhinav Upadhyay <er.abhinav.upadh...@gmail.com>
committer: nascheme <nas-git...@arctrix.com>
date: 2025-08-07T20:31:11Z
summary:

GH-119085: Move comment in Python/gc.c to correct place.

In GH-116206, the comment about moving reachable objects to next generation
got moved from its original place to a place where there is no code below
it. Put the comment back to where the actual movement of reachable objects
happens.

files:
M Python/gc.c

diff --git a/Python/gc.c b/Python/gc.c
index 2e697faac032b5..807bd5b65b2332 100644
--- a/Python/gc.c
+++ b/Python/gc.c
@@ -1710,12 +1710,13 @@ gc_collect_region(PyThreadState *tstate,
     deduce_unreachable(from, &unreachable);
     validate_consistent_old_space(from);
     untrack_tuples(from);
+
+  /* Move reachable objects to next generation. */
     validate_consistent_old_space(to);
     if (from != to) {
         gc_list_merge(from, to);
     }
     validate_consistent_old_space(to);
-    /* Move reachable objects to next generation. */
 
     /* All objects in unreachable are trash, but objects reachable from
      * legacy finalizers (e.g. tp_del) can't safely be deleted.

_______________________________________________
Python-checkins mailing list -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: arch...@mail-archive.com

Reply via email to