]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-131740: minor readability fix in PyUnstable_GC_VisitObjects (gh-131786)
authorMartin DeMello <martindemello@fb.com>
Fri, 28 Mar 2025 23:58:17 +0000 (16:58 -0700)
committerGitHub <noreply@github.com>
Fri, 28 Mar 2025 23:58:17 +0000 (08:58 +0900)
commit9c1e85fd64cf6a85f7c96390d7b2dfad03a76944
tree13c78959a1c0e952820209a763adf61743a93b42
parent2984ff9e5196aa575c7322c2040d55dd4d4eaa02
gh-131740: minor readability fix in PyUnstable_GC_VisitObjects (gh-131786)

Minor readability fix in PyUnstable_GC_VisitObjects

Replaces `if (visit_generation())` with `if (visit_generation() < 0)`,
since we are checking for the failure case, and it's confusing to have
that be implicitly `true`.

Also fixes a misspelt variable name.
Python/gc.c