[Python-checkins] r43326 - python/trunk/Modules/cjkcodecs/multibytecodec.c
hyeshik.chang
python-checkins at python.org
Sun Mar 26 08:53:37 CEST 2006
Author: hyeshik.chang
Date: Sun Mar 26 08:53:37 2006
New Revision: 43326
Modified:
python/trunk/Modules/cjkcodecs/multibytecodec.c
Log:
Utilize %zd for Py_ssize_t formatting instead of casting to long.
Modified: python/trunk/Modules/cjkcodecs/multibytecodec.c
==============================================================================
--- python/trunk/Modules/cjkcodecs/multibytecodec.c (original)
+++ python/trunk/Modules/cjkcodecs/multibytecodec.c Sun Mar 26 08:53:37 2006
@@ -334,8 +334,8 @@
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 @@
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;
More information about the Python-checkins
mailing list