mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
gh-123091: Use more _Py_IsImmortalLoose() (GH-123602)
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.
This commit is contained in:
parent
5002f17794
commit
57c471a688
4 changed files with 5 additions and 5 deletions
|
@ -1049,7 +1049,7 @@ del_cached_def(struct extensions_cache_value *value)
|
|||
However, this decref would be problematic if the module def were
|
||||
dynamically allocated, it were the last ref, and this function
|
||||
were called with an interpreter other than the def's owner. */
|
||||
assert(value->def == NULL || _Py_IsImmortal(value->def));
|
||||
assert(value->def == NULL || _Py_IsImmortalLoose(value->def));
|
||||
|
||||
Py_XDECREF(value->def->m_base.m_copy);
|
||||
value->def->m_base.m_copy = NULL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue