mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
GH-125174: Make immortal objects more robust, following design from PEP 683 (GH-125251)
This commit is contained in:
parent
01fc3b34cc
commit
c9014374c5
17 changed files with 61 additions and 72 deletions
4
Python/executor_cases.c.h
generated
4
Python/executor_cases.c.h
generated
|
|
@ -402,7 +402,7 @@
|
|||
}
|
||||
STAT_INC(TO_BOOL, hit);
|
||||
if (_PyLong_IsZero((PyLongObject *)value_o)) {
|
||||
assert(_Py_IsImmortalLoose(value_o));
|
||||
assert(_Py_IsImmortal(value_o));
|
||||
res = PyStackRef_False;
|
||||
}
|
||||
else {
|
||||
|
|
@ -455,7 +455,7 @@
|
|||
}
|
||||
STAT_INC(TO_BOOL, hit);
|
||||
if (value_o == &_Py_STR(empty)) {
|
||||
assert(_Py_IsImmortalLoose(value_o));
|
||||
assert(_Py_IsImmortal(value_o));
|
||||
res = PyStackRef_False;
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue