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

@ -5020,9 +5020,7 @@ PyObject *PyUnicode_Format(PyObject *format,
case 'X':
if (c == 'i')
c = 'd';
if (PyLong_Check(v) && PyLong_AsLong(v) == -1
&& PyErr_Occurred()) {
PyErr_Clear();
if (PyLong_Check(v)) {
temp = formatlong(v, flags, prec, c);
if (!temp)
goto onError;