gh-123091: Use _Py_IsImmortalLoose() (#123511)

Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c
and ceval.c.
This commit is contained in:
Victor Stinner 2024-09-02 14:25:19 +02:00 committed by GitHub
parent 22fdb8cf89
commit f1a0d96f41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 17 additions and 17 deletions

View file

@ -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 {