From 97d15ae1d8411b49b1fcdc0c67c51849dccce9c9 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 23 Sep 2020 14:08:38 +0200 Subject: 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. --- Objects/structseq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/structseq.c') diff --git a/Objects/structseq.c b/Objects/structseq.c index bd20ce3fbd..8ae8f28cbc 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); } } -- cgit v1.2.1