mirror of
https://github.com/python/cpython.git
synced 2025-08-01 07:33:08 +00:00
Replace long with twodigits, to avoid depending
on sizeof(digit) < sizeof(long)
This commit is contained in:
parent
afe496dc46
commit
b646487687
1 changed files with 1 additions and 1 deletions
|
@ -1273,7 +1273,7 @@ _PyLong_Format(PyObject *aa, int base, int addL, int newstyle)
|
||||||
digit powbase = base; /* powbase == base ** power */
|
digit powbase = base; /* powbase == base ** power */
|
||||||
int power = 1;
|
int power = 1;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
unsigned long newpow = powbase * (unsigned long)base;
|
twodigits newpow = powbase * (twodigits)base;
|
||||||
if (newpow >> PyLong_SHIFT) /* doesn't fit in a digit */
|
if (newpow >> PyLong_SHIFT) /* doesn't fit in a digit */
|
||||||
break;
|
break;
|
||||||
powbase = (digit)newpow;
|
powbase = (digit)newpow;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue