diff options
author | Hye-Shik Chang <hyeshik@gmail.com> | 2006-03-26 06:53:37 +0000 |
---|---|---|
committer | Hye-Shik Chang <hyeshik@gmail.com> | 2006-03-26 06:53:37 +0000 |
commit | fae157441ab9714ab50f6c5859fe8925e386b0ad (patch) | |
tree | 61e512060b08fda8e8f1dc71530b76038fadf9a8 /Modules/cjkcodecs | |
parent | a3a737fe9dcc62d82d51852b86abfc4e5a3c8fb9 (diff) | |
download | cpython-fae157441ab9714ab50f6c5859fe8925e386b0ad.tar.gz |
Utilize %zd for Py_ssize_t formatting instead of casting to long.
Diffstat (limited to 'Modules/cjkcodecs')
-rw-r--r-- | Modules/cjkcodecs/multibytecodec.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/cjkcodecs/multibytecodec.c b/Modules/cjkcodecs/multibytecodec.c index c19da9c127..6e5c587814 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; |