mirror of
https://github.com/python/cpython.git
synced 2025-08-24 02:35:59 +00:00
gh-123091: Use _Py_IsImmortalLoose() (#123511)
Use _Py_IsImmortalLoose() in bytesobject.c, typeobject.c
and ceval.c.
(cherry picked from commit f1a0d96f41
)
This commit is contained in:
parent
b76a4a5db7
commit
10735bff9e
7 changed files with 17 additions and 17 deletions
|
@ -362,7 +362,7 @@ dummy_func(
|
|||
EXIT_IF(!PyLong_CheckExact(value));
|
||||
STAT_INC(TO_BOOL, hit);
|
||||
if (_PyLong_IsZero((PyLongObject *)value)) {
|
||||
assert(_Py_IsImmortal(value));
|
||||
assert(_Py_IsImmortalLoose(value));
|
||||
res = Py_False;
|
||||
}
|
||||
else {
|
||||
|
@ -389,7 +389,7 @@ dummy_func(
|
|||
EXIT_IF(!PyUnicode_CheckExact(value));
|
||||
STAT_INC(TO_BOOL, hit);
|
||||
if (value == &_Py_STR(empty)) {
|
||||
assert(_Py_IsImmortal(value));
|
||||
assert(_Py_IsImmortalLoose(value));
|
||||
res = Py_False;
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue