]> granicus.if.org Git - python/commitdiff
Merged revisions 71548 via svnmerge from
authorEric Smith <eric@trueblade.com>
Mon, 13 Apr 2009 00:50:23 +0000 (00:50 +0000)
committerEric Smith <eric@trueblade.com>
Mon, 13 Apr 2009 00:50:23 +0000 (00:50 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r71548 | eric.smith | 2009-04-12 20:29:50 -0400 (Sun, 12 Apr 2009) | 1 line

  Fixed incorrect object passed into format_float_internal(). This was resulting in a conversion being done twice.
........

Objects/stringlib/formatter.h

index b86dc8b15c0205af0d09ea96b13a55bad4f2d609..d936a6702ee7da4dacf944283ffe7115895975b1 100644 (file)
@@ -968,7 +968,7 @@ format_int_or_long(PyObject* obj,
         tmp = PyNumber_Float(obj);
         if (tmp == NULL)
             goto done;
-        result = format_float_internal(obj, &format);
+        result = format_float_internal(tmp, &format);
         break;
 
     default: