]> granicus.if.org Git - python/commitdiff
Merged revisions 69974 via svnmerge from
authorMark Dickinson <dickinsm@gmail.com>
Wed, 25 Feb 2009 20:33:49 +0000 (20:33 +0000)
committerMark Dickinson <dickinsm@gmail.com>
Wed, 25 Feb 2009 20:33:49 +0000 (20:33 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69974 | mark.dickinson | 2009-02-25 20:29:50 +0000 (Wed, 25 Feb 2009) | 3 lines

  Replace long with twodigits, to avoid depending
  on sizeof(digit) < sizeof(long)
........

Objects/longobject.c

index 48a3cde7e6f95ea537938892889c1fc8e410f020..b758c40203a24dab86ece09c116d1ee07e19176d 100644 (file)
@@ -1557,7 +1557,7 @@ _PyLong_Format(PyObject *aa, int base)
                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;