diff options
author | Victor Stinner <vstinner@python.org> | 2020-09-23 12:08:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-23 12:08:38 (GMT) |
commit | 97d15ae1d8411b49b1fcdc0c67c51849dccce9c9 (patch) | |
tree | 9418f79ebdc807c61273226dfc8b701a152bdb26 /Objects | |
parent | b7d8d8dbfe83040087a63662e0b908f4b5ac24b0 (diff) | |
download | cpython-97d15ae1d8411b49b1fcdc0c67c51849dccce9c9.zip cpython-97d15ae1d8411b49b1fcdc0c67c51849dccce9c9.tar.gz cpython-97d15ae1d8411b49b1fcdc0c67c51849dccce9c9.tar.bz2 |
bpo-40170: Use inline _PyType_HasFeature() function (GH-22375)
Use _PyType_HasFeature() in the _io module and in structseq
implementation. Replace PyType_HasFeature() opaque function call with
_PyType_HasFeature() inlined function.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/structseq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/structseq.c b/Objects/structseq.c index bd20ce3..8ae8f28 100644 --- a/Objects/structseq.c +++ b/Objects/structseq.c @@ -94,7 +94,7 @@ structseq_dealloc(PyStructSequence *obj) Py_XDECREF(obj->ob_item[i]); } PyObject_GC_Del(obj); - if (PyType_GetFlags(tp) & Py_TPFLAGS_HEAPTYPE) { + if (_PyType_HasFeature(tp, Py_TPFLAGS_HEAPTYPE)) { Py_DECREF(tp); } } |