We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f5df517 commit 21c59bbCopy full SHA for 21c59bb
1 file changed
Include/internal/pycore_long.h
@@ -238,11 +238,12 @@ _PyLong_IsSmallInt(const PyLongObject *op)
238
{
239
assert(PyLong_Check(op));
240
bool is_small_int = (op->long_value.lv_tag & IMMORTALITY_BIT_MASK) != 0;
241
- assert(PyLong_CheckExact(op) || (!is_small_int));
242
- assert(_Py_IsImmortal(op) || (!is_small_int));
243
- assert((_PyLong_IsCompact(op)
244
- && _PY_IS_SMALL_INT(_PyLong_CompactValue(op)))
245
- || (!is_small_int));
+ if (is_small_int) {
+ assert(PyLong_CheckExact(op));
+ assert(_Py_IsImmortal(op));
+ assert((_PyLong_IsCompact(op)
+ && _PY_IS_SMALL_INT(_PyLong_CompactValue(op))));
246
+ }
247
return is_small_int;
248
}
249
0 commit comments