mirror of
https://github.com/python/cpython.git
synced 2026-01-06 23:42:34 +00:00
GH-125174: Make immortal objects more robust, following design from PEP 683 (GH-125251)
This commit is contained in:
parent
01fc3b34cc
commit
c9014374c5
17 changed files with 61 additions and 72 deletions
|
|
@ -1051,7 +1051,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_IsImmortalLoose(value->def));
|
||||
assert(value->def == NULL || _Py_IsImmortal(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