summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorHye-Shik Chang <hyeshik@gmail.com>2006-03-26 06:53:37 (GMT)
committerHye-Shik Chang <hyeshik@gmail.com>2006-03-26 06:53:37 (GMT)
commit04904faac52de7b83335e404fe460586537c2565 (patch)
treeddc36913d8d880cbd2cac39a600a9340df00fbdb /Modules
parent9f4b632212742fbcd91e921e2516a6285fd7728b (diff)
downloadcpython-04904faac52de7b83335e404fe460586537c2565.zip
cpython-04904faac52de7b83335e404fe460586537c2565.tar.gz
cpython-04904faac52de7b83335e404fe460586537c2565.tar.bz2
Utilize %zd for Py_ssize_t formatting instead of casting to long.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/cjkcodecs/multibytecodec.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c
index c19da9c..6e5c587 100644
--- a/Modules/cjkcodecs/multibytecodec.c
+++ b/Modules/cjkcodecs/multibytecodec.c
@@ -334,8 +334,8 @@ multibytecodec_encerror(MultibyteCodec *codec,
if (newpos < 0 || buf->inbuf_top + newpos > buf->inbuf_end) {
PyErr_Clear();
PyErr_Format(PyExc_IndexError,
- "position %ld from error handler out of bounds",
- (long)newpos);
+ "position %zd from error handler out of bounds",
+ newpos);
goto errorexit;
}
buf->inbuf = buf->inbuf_top + newpos;
@@ -445,8 +445,8 @@ multibytecodec_decerror(MultibyteCodec *codec,
if (newpos < 0 || buf->inbuf_top + newpos > buf->inbuf_end) {
PyErr_Clear();
PyErr_Format(PyExc_IndexError,
- "position %ld from error handler out of bounds",
- (long)newpos);
+ "position %zd from error handler out of bounds",
+ newpos);
goto errorexit;
}
buf->inbuf = buf->inbuf_top + newpos;