Skip to content

Commit 5df112e

Browse files
committed
longobject.c: fix compilation warning on Windows 64-bit
We know that Py_SIZE(b) is -1 or 1 an so fits into the sdigit type.
1 parent 185ecdc commit 5df112e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Objects/longobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3522,7 +3522,7 @@ fast_mod(PyLongObject *a, PyLongObject *b)
35223522
mod = right - 1 - (left - 1) % right;
35233523
}
35243524

3525-
return PyLong_FromLong(mod * Py_SIZE(b));
3525+
return PyLong_FromLong(mod * (sdigit)Py_SIZE(b));
35263526
}
35273527

35283528
/* Fast floor division for single-digit longs. */

0 commit comments

Comments
 (0)