gh-123091: Use _Py_IsImmortalLoose() (#123511)
Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c and ceval.c.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user