From f963c135979838893772619e83f94db97c536048 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 23 Mar 2016 18:36:54 +0100 Subject: [PATCH] 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. --- Objects/longobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/longobject.c b/Objects/longobject.c index 3f9837fc93..70d8cfc6a7 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -3522,7 +3522,7 @@ fast_mod(PyLongObject *a, PyLongObject *b) mod = right - 1 - (left - 1) % right; } - return PyLong_FromLong(mod * Py_SIZE(b)); + return PyLong_FromLong(mod * (sdigit)Py_SIZE(b)); } /* Fast floor division for single-digit longs. */ -- 2.40.0