Fox for SF bug #123859: %[duxXo] long formats inconsistent.

This commit is contained in:
Tim Peters 2000-11-30 05:22:44 +00:00
parent 469d5bb0b4
commit a3a3a030af
4 changed files with 50 additions and 24 deletions

View file

@ -2897,10 +2897,7 @@ PyString_Format(PyObject *format, PyObject *args)
case 'X':
if (c == 'i')
c = 'd';
if (PyLong_Check(v) && PyLong_AsLong(v) == -1
&& PyErr_Occurred()) {
/* Too big for a C long. */
PyErr_Clear();
if (PyLong_Check(v)) {
temp = _PyString_FormatLong(v, flags,
prec, c, &pbuf, &len);
if (!temp)