Replace long with twodigits, to avoid depending

on sizeof(digit) < sizeof(long)
This commit is contained in:
Mark Dickinson 2009-02-25 20:29:50 +00:00
parent afe496dc46
commit b646487687

View file

@ -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;