Skip to content

Commit

Permalink
keep using _PyType_HasFeature() in loops
Browse files Browse the repository at this point in the history
  • Loading branch information
neonene committed Sep 20, 2024
1 parent 967d197 commit 8c5fc03
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -5297,7 +5297,7 @@ get_base_by_token_recursive(PyTypeObject *type, void *token)
Py_ssize_t n = PyTuple_GET_SIZE(bases);
for (Py_ssize_t i = 0; i < n; i++) {
PyTypeObject *base = _PyType_CAST(PyTuple_GET_ITEM(bases, i));
if (!PyType_HasFeature(base, Py_TPFLAGS_HEAPTYPE)) {
if (!_PyType_HasFeature(base, Py_TPFLAGS_HEAPTYPE)) {
continue;
}
if (((PyHeapTypeObject*)base)->ht_token == token) {
Expand Down Expand Up @@ -5328,7 +5328,7 @@ get_base_by_token_from_mro(PyTypeObject *type, void *token)
Py_ssize_t n = PyTuple_GET_SIZE(mro);
for (Py_ssize_t i = 1; i < n; i++) {
PyTypeObject *base = _PyType_CAST(PyTuple_GET_ITEM(mro, i));
if (!PyType_HasFeature(base, Py_TPFLAGS_HEAPTYPE)) {
if (!_PyType_HasFeature(base, Py_TPFLAGS_HEAPTYPE)) {
continue;
}
if (((PyHeapTypeObject*)base)->ht_token == token) {
Expand Down

0 comments on commit 8c5fc03

Please sign in to comment.