mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
[3.13] gh-123091: Use more _Py_IsImmortalLoose() (GH-123602) (GH-123622)
Switch more _Py_IsImmortal(...) assertions to _Py_IsImmortalLoose(...)
The remaining calls to _Py_IsImmortal are in free-threaded-only code,
initialization of core objects, tests, and guards that fall back to
code that works with mortal objects.
(cherry picked from commit 57c471a688
)
This commit is contained in:
parent
7761ddcfed
commit
d655c65561
3 changed files with 3 additions and 3 deletions
|
@ -725,7 +725,7 @@ _PyStructSequence_FiniBuiltin(PyInterpreterState *interp, PyTypeObject *type)
|
|||
assert(type->tp_name != NULL);
|
||||
assert(type->tp_base == &PyTuple_Type);
|
||||
assert((type->tp_flags & _Py_TPFLAGS_STATIC_BUILTIN));
|
||||
assert(_Py_IsImmortal(type));
|
||||
assert(_Py_IsImmortalLoose(type));
|
||||
|
||||
// Cannot delete a type if it still has subclasses
|
||||
if (_PyType_HasSubclasses(type)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue