diff options
author | Mark Shannon <mark@hotpy.org> | 2024-10-10 17:19:08 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-10 17:19:08 (GMT) |
commit | c9014374c50d6ef64786d3e7d9c7e99053d5c9e2 (patch) | |
tree | 0aa842abbebaa90dfbafe985f2ab1fb5688ce45f /Python/import.c | |
parent | 01fc3b34cc6994bc83b6540da3a8573e79dfbb56 (diff) | |
download | cpython-c9014374c50d6ef64786d3e7d9c7e99053d5c9e2.zip cpython-c9014374c50d6ef64786d3e7d9c7e99053d5c9e2.tar.gz cpython-c9014374c50d6ef64786d3e7d9c7e99053d5c9e2.tar.bz2 |
GH-125174: Make immortal objects more robust, following design from PEP 683 (GH-125251)
Diffstat (limited to 'Python/import.c')
-rw-r--r-- | Python/import.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c index 460b1fe..acf849f 100644 --- a/Python/import.c +++ b/Python/import.c @@ -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; |