]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40170: PyType_SUPPORTS_WEAKREFS() becomes a regular function (GH-30938)
authorVictor Stinner <vstinner@python.org>
Thu, 27 Jan 2022 02:00:55 +0000 (03:00 +0100)
committerGitHub <noreply@github.com>
Thu, 27 Jan 2022 02:00:55 +0000 (03:00 +0100)
commitaf32b3ef1fbad3c2242627a14398320960a0cb45
tree350016f513e2ebbdae51ee1e033f668dc2d3f609
parentf0a648152f2d8011f47cc49873438ebaf01d3f82
bpo-40170: PyType_SUPPORTS_WEAKREFS() becomes a regular function (GH-30938)

Convert the PyType_SUPPORTS_WEAKREFS() macro to a regular function.
It no longer access the PyTypeObject.tp_weaklistoffset member
directly.

Add _PyType_SUPPORTS_WEAKREFS() static inline functions, used
internally by Python for best performance.
Include/cpython/objimpl.h
Include/internal/pycore_object.h
Modules/_weakref.c
Modules/gcmodule.c
Objects/exceptions.c
Objects/typeobject.c
Objects/weakrefobject.c