gh-103826: fix unused variable warning introduced in gh-102343 (#103825)

This commit is contained in:
sunmy2019 2023-04-25 18:01:04 +08:00 committed by GitHub
parent d8627999d8
commit 0acea96dad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -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;