Skip to content

Commit 69d35bd

Browse files
committed
add assert
1 parent 78c5b4b commit 69d35bd

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
@@ -237,6 +237,7 @@ _PyLong_HasImmortalTag(const PyLongObject *op)
237237
assert(PyLong_Check(op));
238238
bool is_small_int = (op->long_value.lv_tag & IMMORTALITY_BIT_MASK) != 0;
239239
assert(PyLong_CheckExact(op) || (!is_small_int));
240+
assert((is_small_int && _Py_IsImmortal(op)) || (!is_small_int));
240241
return is_small_int;
241242
}
242243

0 commit comments

Comments
 (0)