[Python-checkins] cpython: longobject.c: fix compilation warning on Windows 64-bit

victor.stinner python-checkins at python.org
Wed Mar 23 13:37:20 EDT 2016


https://hg.python.org/cpython/rev/fdb89a285ce6
changeset: 100696:fdb89a285ce6
user: Victor Stinner <victor.stinner at gmail.com>
date: Wed Mar 23 18:36:54 2016 +0100
summary:
 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.
files:
 Objects/longobject.c | 2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/Objects/longobject.c b/Objects/longobject.c
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -3522,7 +3522,7 @@
 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. */
-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /