diff options
author | Mark Shannon <mark@hotpy.org> | 2024-10-10 18:19:08 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-10 18:19:08 +0100 |
commit | c9014374c50d6ef64786d3e7d9c7e99053d5c9e2 (patch) | |
tree | 0aa842abbebaa90dfbafe985f2ab1fb5688ce45f /Python/bytecodes.c | |
parent | 01fc3b34cc6994bc83b6540da3a8573e79dfbb56 (diff) | |
download | cpython-c9014374c50d6ef64786d3e7d9c7e99053d5c9e2.tar.gz cpython-c9014374c50d6ef64786d3e7d9c7e99053d5c9e2.zip |
GH-125174: Make immortal objects more robust, following design from PEP 683 (GH-125251)
Diffstat (limited to 'Python/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 87cca3fc1d3..34fdfcb05e3 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -381,7 +381,7 @@ dummy_func( EXIT_IF(!PyLong_CheckExact(value_o)); STAT_INC(TO_BOOL, hit); if (_PyLong_IsZero((PyLongObject *)value_o)) { - assert(_Py_IsImmortalLoose(value_o)); + assert(_Py_IsImmortal(value_o)); DEAD(value); res = PyStackRef_False; } @@ -412,7 +412,7 @@ dummy_func( EXIT_IF(!PyUnicode_CheckExact(value_o)); STAT_INC(TO_BOOL, hit); if (value_o == &_Py_STR(empty)) { - assert(_Py_IsImmortalLoose(value_o)); + assert(_Py_IsImmortal(value_o)); DEAD(value); res = PyStackRef_False; } |