summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-09-02 12:25:19 (GMT)
committerGitHub <noreply@github.com>2024-09-02 12:25:19 (GMT)
commitf1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91 (patch)
treeab17e40e32127f2657a5a47549a418e063a71ac2 /Python
parent22fdb8cf899d2dd29f2ac0bf61309af6809719fb (diff)
downloadcpython-f1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91.zip
cpython-f1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91.tar.gz
cpython-f1a0d96f41db9dfa5d7f0b32e72f6f7301a86f91.tar.bz2
gh-123091: Use _Py_IsImmortalLoose() (#123511)
Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c and ceval.c.
Diffstat (limited to 'Python')
-rw-r--r--Python/bytecodes.c4
-rw-r--r--Python/executor_cases.c.h4
-rw-r--r--Python/generated_cases.c.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c
index 01e88a3..c4cc812 100644
--- a/Python/bytecodes.c
+++ b/Python/bytecodes.c
@@ -374,7 +374,7 @@ dummy_func(
EXIT_IF(!PyLong_CheckExact(value_o));
STAT_INC(TO_BOOL, hit);
if (_PyLong_IsZero((PyLongObject *)value_o)) {
- assert(_Py_IsImmortal(value_o));
+ assert(_Py_IsImmortalLoose(value_o));
res = PyStackRef_False;
}
else {
@@ -403,7 +403,7 @@ dummy_func(
EXIT_IF(!PyUnicode_CheckExact(value_o));
STAT_INC(TO_BOOL, hit);
if (value_o == &_Py_STR(empty)) {
- assert(_Py_IsImmortal(value_o));
+ assert(_Py_IsImmortalLoose(value_o));
res = PyStackRef_False;
}
else {
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 0de5c8a..d4be790 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -390,7 +390,7 @@
}
STAT_INC(TO_BOOL, hit);
if (_PyLong_IsZero((PyLongObject *)value_o)) {
- assert(_Py_IsImmortal(value_o));
+ assert(_Py_IsImmortalLoose(value_o));
res = PyStackRef_False;
}
else {
@@ -443,7 +443,7 @@
}
STAT_INC(TO_BOOL, hit);
if (value_o == &_Py_STR(empty)) {
- assert(_Py_IsImmortal(value_o));
+ assert(_Py_IsImmortalLoose(value_o));
res = PyStackRef_False;
}
else {
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h
index 9a75101..65dfb99 100644
--- a/Python/generated_cases.c.h
+++ b/Python/generated_cases.c.h
@@ -7330,7 +7330,7 @@
DEOPT_IF(!PyLong_CheckExact(value_o), TO_BOOL);
STAT_INC(TO_BOOL, hit);
if (_PyLong_IsZero((PyLongObject *)value_o)) {
- assert(_Py_IsImmortal(value_o));
+ assert(_Py_IsImmortalLoose(value_o));
res = PyStackRef_False;
}
else {
@@ -7392,7 +7392,7 @@
DEOPT_IF(!PyUnicode_CheckExact(value_o), TO_BOOL);
STAT_INC(TO_BOOL, hit);
if (value_o == &_Py_STR(empty)) {
- assert(_Py_IsImmortal(value_o));
+ assert(_Py_IsImmortalLoose(value_o));
res = PyStackRef_False;
}
else {