summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2024-10-10 17:19:08 (GMT)
committerGitHub <noreply@github.com>2024-10-10 17:19:08 (GMT)
commitc9014374c50d6ef64786d3e7d9c7e99053d5c9e2 (patch)
tree0aa842abbebaa90dfbafe985f2ab1fb5688ce45f /Python/import.c
parent01fc3b34cc6994bc83b6540da3a8573e79dfbb56 (diff)
downloadcpython-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.c2
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;