summaryrefslogtreecommitdiffstats
path: root/Objects/typeobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/typeobject.c')
-rw-r--r--Objects/typeobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 07c9009..09ea566 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -6706,7 +6706,6 @@ type_ready_mro(PyTypeObject *type)
and static builtin types must have static builtin bases. */
if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
assert(type->tp_flags & Py_TPFLAGS_IMMUTABLETYPE);
- int isbuiltin = type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN;
PyObject *mro = type->tp_mro;
Py_ssize_t n = PyTuple_GET_SIZE(mro);
for (Py_ssize_t i = 0; i < n; i++) {
@@ -6718,7 +6717,8 @@ type_ready_mro(PyTypeObject *type)
type->tp_name, base->tp_name);
return -1;
}
- assert(!isbuiltin || (base->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN));
+ assert(!(type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN) ||
+ (base->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN));
}
}
return 0;