Skip to content

Commit e28e94c

Browse files
committed
address review: add _Py_IsImmortal check
1 parent b892216 commit e28e94c

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Include/internal/pycore_long.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ static inline bool
235235
_PyLong_IsImmortal(const PyLongObject *op)
236236
{
237237
assert(PyLong_Check(op));
238+
assert(_Py_IsImmortal(op));
238239
bool is_small_int = (op->long_value.lv_tag & IMMORTALITY_BIT_MASK) != 0;
239240
assert(PyLong_CheckExact(op) || (!is_small_int));
240241
return is_small_int;

0 commit comments

Comments
 (0)