There was an error while loading. Please reload this page.
1 parent 2225dda commit 86aa269Copy full SHA for 86aa269
1 file changed
Objects/longobject.c
@@ -316,7 +316,7 @@ PyLong_FromUnsignedLong(unsigned long ival)
316
if (ival < PyLong_BASE)
317
return PyLong_FromLong(ival);
318
/* Count the number of Python digits. */
319
- t = (unsigned long)ival;
+ t = ival;
320
while (t) {
321
++ndigits;
322
t >>= PyLong_SHIFT;
@@ -854,7 +854,7 @@ _PyLong_FromByteArray(const unsigned char* bytes, size_t n,
854
/* Because we're going LSB to MSB, thisbyte is
855
more significant than what's already in accum,
856
so needs to be prepended to accum. */
857
- accum |= (twodigits)thisbyte << accumbits;
+ accum |= thisbyte << accumbits;
858
accumbits += 8;
859
if (accumbits >= PyLong_SHIFT) {
860
/* There's enough to fill a Python digit. */
@@ -1121,7 +1121,7 @@ PyLong_FromUnsignedLongLong(unsigned long long ival)
1121
1122
return PyLong_FromLong((long)ival);
1123
1124
- t = (unsigned long long)ival;
1125
1126
1127
0 commit comments