summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2024-09-03 10:36:42 (GMT)
committerGitHub <noreply@github.com>2024-09-03 10:36:42 (GMT)
commitd655c655619d8a6b7eec908a7b7c770d5f2ac0f8 (patch)
treef9b9f92e90fb19c164a45b7249dbc969eb2b39b9 /Python/import.c
parent7761ddcfed82b89c4a9d5610bf1821912e0e90d1 (diff)
downloadcpython-d655c655619d8a6b7eec908a7b7c770d5f2ac0f8.zip
cpython-d655c655619d8a6b7eec908a7b7c770d5f2ac0f8.tar.gz
cpython-d655c655619d8a6b7eec908a7b7c770d5f2ac0f8.tar.bz2
[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 57c471a6880956338549380fc5fb35c986937901)
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 88f6a7a..1056ddd 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1048,7 +1048,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;