summaryrefslogtreecommitdiffstats
path: root/Objects/unicodeobject.c
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2006-02-16 06:54:25 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2006-02-16 06:54:25 (GMT)
commit2c95cc6d72957296c46bb11362359675a47e2085 (patch)
tree9e6e78432b2aef86240297833b644d4d60d771a7 /Objects/unicodeobject.c
parent26efe402c2a5dba441dc2feae2f15fea6be452ba (diff)
downloadcpython-2c95cc6d72957296c46bb11362359675a47e2085.zip
cpython-2c95cc6d72957296c46bb11362359675a47e2085.tar.gz
cpython-2c95cc6d72957296c46bb11362359675a47e2085.tar.bz2
Support %zd in PyErr_Format and PyString_FromFormat.
Diffstat (limited to 'Objects/unicodeobject.c')
-rw-r--r--Objects/unicodeobject.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index 1652b2f..684706d 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -791,8 +791,7 @@ int unicode_decode_call_errorhandler(const char *errors, PyObject **errorHandler
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 @@ static PyObject *unicode_encode_call_errorhandler(const char *errors,
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 @@ static PyObject *unicode_translate_call_errorhandler(const char *errors,
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;
}