mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +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 */
|
||||
int power = 1;
|
||||
for (;;) {
|
||||
unsigned long newpow = powbase * (unsigned long)base;
|
||||
twodigits newpow = powbase * (twodigits)base;
|
||||
if (newpow >> PyLong_SHIFT) /* doesn't fit in a digit */
|
||||
break;
|
||||
powbase = (digit)newpow;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue