summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2024-09-02 16:17:48 (GMT)
committerGitHub <noreply@github.com>2024-09-02 16:17:48 (GMT)
commit57c471a6880956338549380fc5fb35c986937901 (patch)
tree57833b1f0b12f5408dc75b67afe3d3384d677e45 /Python/import.c
parent5002f17794a9f403540305c733698d1e01699490 (diff)
downloadcpython-57c471a6880956338549380fc5fb35c986937901.zip
cpython-57c471a6880956338549380fc5fb35c986937901.tar.gz
cpython-57c471a6880956338549380fc5fb35c986937901.tar.bz2
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.
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 c9212ec..a5ea0e2 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -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;