Mercurial > cpython-lru_cache-weakref
diff Objects/unicodeobject.c @ 36510:0f3894bb2ada legacy-trunk
Support %zd in PyErr_Format and PyString_FromFormat.
| author | Martin v. Löwis <martin@v.loewis.de> |
|---|---|
| date | Thu, 16 Feb 2006 06:54:25 +0000 |
| parents | 7322dccba224 |
| children | d6d415df0df0 |
line wrap: on
line diff
--- a/Objects/unicodeobject.c Thu Feb 16 06:21:57 2006 +0000 +++ b/Objects/unicodeobject.c Thu Feb 16 06:54:25 2006 +0000 @@ -791,8 +791,7 @@ if (newpos<0) newpos = insize+newpos; if (newpos<0 || newpos>insize) { - /* XXX %zd? */ - PyErr_Format(PyExc_IndexError, "position %d from error handler out of bounds", (int)newpos); + PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", newpos); goto onError; } @@ -2473,8 +2472,7 @@ if (*newpos<0) *newpos = size+*newpos; if (*newpos<0 || *newpos>size) { - /* XXX %zd? */ - PyErr_Format(PyExc_IndexError, "position %d from error handler out of bounds", (int)*newpos); + PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", *newpos); Py_DECREF(restuple); return NULL; } @@ -3373,8 +3371,7 @@ else *newpos = i_newpos; if (*newpos<0 || *newpos>size) { - /* XXX %zd? */ - PyErr_Format(PyExc_IndexError, "position %d from error handler out of bounds", (int)*newpos); + PyErr_Format(PyExc_IndexError, "position %zd from error handler out of bounds", *newpos); Py_DECREF(restuple); return NULL; }
