From: Mark Dickinson Date: Wed, 25 Feb 2009 20:29:50 +0000 (+0000) Subject: Replace long with twodigits, to avoid depending X-Git-Tag: v2.7a1~1947 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6464876876d6cb2ce53c40ae33daa5a00d522a4;p=python Replace long with twodigits, to avoid depending on sizeof(digit) < sizeof(long) --- diff --git a/Objects/longobject.c b/Objects/longobject.c index 6a5a724c8b..9bd6378a16 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -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;