]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40170: PyType_HasFeature() now always calls PyType_GetFlags() (GH-19378)
authorVictor Stinner <vstinner@python.org>
Tue, 7 Apr 2020 23:42:27 +0000 (01:42 +0200)
committerGitHub <noreply@github.com>
Tue, 7 Apr 2020 23:42:27 +0000 (01:42 +0200)
commit45ec5b99aefa54552947049086e87ec01bc2fc9a
tree991c703174190872d806ae18387e69d62ff69c76
parentef5c615f5ae72c4f6979159c94da46afefbfab9a
bpo-40170: PyType_HasFeature() now always calls PyType_GetFlags() (GH-19378)

PyType_HasFeature() now always calls PyType_GetFlags() to hide
implementation details. Previously, it accessed directly the
PyTypeObject.tp_flags member when the limited C API was not used.

Add fast inlined version _PyType_HasFeature() and _PyType_IS_GC()
for object.c and typeobject.c.
Include/internal/pycore_object.h
Include/object.h
Misc/NEWS.d/next/C API/2020-04-05-00-21-38.bpo-40170.Tx0vy6.rst [new file with mode: 0644]
Objects/object.c
Objects/typeobject.c