]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-119127: Fix _functools.Placeholder singleton (#124601)
authorVictor Stinner <vstinner@python.org>
Thu, 26 Sep 2024 14:50:38 +0000 (16:50 +0200)
committerGitHub <noreply@github.com>
Thu, 26 Sep 2024 14:50:38 +0000 (16:50 +0200)
commit257a20a81764fcc17bcde9c0cec57fbc53a4adc7
tree32592f63994993b8ff275ef497bbbda9d8af5b9a
parentabe5f799e6ce1d177f79554f1b84d348b6141045
gh-119127: Fix _functools.Placeholder singleton (#124601)

* The module state now stores a strong reference to the Placeholder
  singleton.
* Use a regular dealloc function.
* Add Py_TPFLAGS_HAVE_GC flag and a traverse function to help the GC
  to collect the type when a _functools extension is unloaded.
Modules/_functoolsmodule.c