mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
Utilize %zd for Py_ssize_t formatting instead of casting to long.
This commit is contained in:
parent
9f4b632212
commit
04904faac5
1 changed files with 4 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue