summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-04-07 23:42:27 (GMT)
committerGitHub <noreply@github.com>2020-04-07 23:42:27 (GMT)
commit45ec5b99aefa54552947049086e87ec01bc2fc9a (patch)
tree991c703174190872d806ae18387e69d62ff69c76 /Misc
parentef5c615f5ae72c4f6979159c94da46afefbfab9a (diff)
downloadcpython-45ec5b99aefa54552947049086e87ec01bc2fc9a.zip
cpython-45ec5b99aefa54552947049086e87ec01bc2fc9a.tar.gz
cpython-45ec5b99aefa54552947049086e87ec01bc2fc9a.tar.bz2
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.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/C API/2020-04-05-00-21-38.bpo-40170.Tx0vy6.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/C API/2020-04-05-00-21-38.bpo-40170.Tx0vy6.rst b/Misc/NEWS.d/next/C API/2020-04-05-00-21-38.bpo-40170.Tx0vy6.rst
new file mode 100644
index 0000000..858611d
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2020-04-05-00-21-38.bpo-40170.Tx0vy6.rst
@@ -0,0 +1,4 @@
+:c:func:`PyType_HasFeature` now always calls :c:func:`PyType_GetFlags` to
+hide implementation details. Previously, it accessed directly the
+:c:member:`PyTypeObject.tp_flags` member when the limited C API was not
+used.