bpo-40170: Use inline _PyType_HasFeature() function (GH-22375) · python/cpython@97d15ae (original) (raw)
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -349,8 +349,9 @@ iobase_dealloc(iobase *self) | ||
349 | 349 | if (_PyIOBase_finalize((PyObject *) self) < 0) { |
350 | 350 | /* When called from a heap type's dealloc, the type will be |
351 | 351 | decref'ed on return (see e.g. subtype_dealloc in typeobject.c). */ |
352 | -if (PyType_HasFeature(Py_TYPE(self), Py_TPFLAGS_HEAPTYPE)) | |
352 | +if (_PyType_HasFeature(Py_TYPE(self), Py_TPFLAGS_HEAPTYPE)) { | |
353 | 353 | Py_INCREF(Py_TYPE(self)); |
354 | + } | |
354 | 355 | return; |
355 | 356 | } |
356 | 357 | _PyObject_GC_UNTRACK(self); |