summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authororenmn <orenmn@gmail.com>2017-03-06 08:42:47 (GMT)
committerMark Dickinson <mdickinson@enthought.com>2017-03-06 08:42:47 (GMT)
commit86aa269646fa73bbcbc26f45ed854359d04c1fde (patch)
tree17a7c796cc1745c149e42e3a420d5299440ad7e4 /Objects
parent2225ddaa9e64c086b2b6997b0c9ac50921f7aa85 (diff)
downloadcpython-86aa269646fa73bbcbc26f45ed854359d04c1fde.zip
cpython-86aa269646fa73bbcbc26f45ed854359d04c1fde.tar.gz
cpython-86aa269646fa73bbcbc26f45ed854359d04c1fde.tar.bz2
remove 3 redundant casts in Objects/longobject.c (#445)
Diffstat (limited to 'Objects')
-rw-r--r--Objects/longobject.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index 6c47602..6a5bc47 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -316,7 +316,7 @@ PyLong_FromUnsignedLong(unsigned long ival)
if (ival < PyLong_BASE)
return PyLong_FromLong(ival);
/* Count the number of Python digits. */
- t = (unsigned long)ival;
+ t = ival;
while (t) {
++ndigits;
t >>= PyLong_SHIFT;
@@ -854,7 +854,7 @@ _PyLong_FromByteArray(const unsigned char* bytes, size_t n,
/* Because we're going LSB to MSB, thisbyte is
more significant than what's already in accum,
so needs to be prepended to accum. */
- accum |= (twodigits)thisbyte << accumbits;
+ accum |= thisbyte << accumbits;
accumbits += 8;
if (accumbits >= PyLong_SHIFT) {
/* There's enough to fill a Python digit. */
@@ -1121,7 +1121,7 @@ PyLong_FromUnsignedLongLong(unsigned long long ival)
if (ival < PyLong_BASE)
return PyLong_FromLong((long)ival);
/* Count the number of Python digits. */
- t = (unsigned long long)ival;
+ t = ival;
while (t) {
++ndigits;
t >>= PyLong_SHIFT;