mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Fox for SF bug #123859: %[duxXo] long formats inconsistent.
This commit is contained in:
parent
469d5bb0b4
commit
a3a3a030af
4 changed files with 50 additions and 24 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue