Skip to content

Commit 0acea96

Browse files
authored
gh-103826: fix unused variable warning introduced in gh-102343 (#103825)
1 parent d862799 commit 0acea96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/typeobject.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -6706,7 +6706,6 @@ type_ready_mro(PyTypeObject *type)
67066706
and static builtin types must have static builtin bases. */
67076707
if (!(type->tp_flags & Py_TPFLAGS_HEAPTYPE)) {
67086708
assert(type->tp_flags & Py_TPFLAGS_IMMUTABLETYPE);
6709-
int isbuiltin = type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN;
67106709
PyObject *mro = type->tp_mro;
67116710
Py_ssize_t n = PyTuple_GET_SIZE(mro);
67126711
for (Py_ssize_t i = 0; i < n; i++) {
@@ -6718,7 +6717,8 @@ type_ready_mro(PyTypeObject *type)
67186717
type->tp_name, base->tp_name);
67196718
return -1;
67206719
}
6721-
assert(!isbuiltin || (base->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN));
6720+
assert(!(type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN) ||
6721+
(base->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN));
67226722
}
67236723
}
67246724
return 0;

0 commit comments

Comments
 (0)