bpo-40170: PyType_SUPPORTS_WEAKREFS() becomes a regular function by vstinner · Pull Request #30938 · python/cpython (original) (raw)
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 performances.