Commit ba2f5b17 authored by cgohlke's avatar cgohlke

Use CYTHON_FORMAT_SSIZE_T

parent a7bfb6cb
...@@ -544,7 +544,7 @@ static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) { ...@@ -544,7 +544,7 @@ static int __Pyx_BufFmt_ProcessTypeChunk(__Pyx_BufFmt_Context* ctx) {
offset = ctx->head->parent_offset + field->offset; offset = ctx->head->parent_offset + field->offset;
if (ctx->fmt_offset != offset) { if (ctx->fmt_offset != offset) {
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"Buffer dtype mismatch; next field is at offset %" PY_FORMAT_SIZE_T "d but %" PY_FORMAT_SIZE_T "d expected", "Buffer dtype mismatch; next field is at offset %" CYTHON_FORMAT_SSIZE_T "d but %" CYTHON_FORMAT_SSIZE_T "d expected",
(Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset); (Py_ssize_t)ctx->fmt_offset, (Py_ssize_t)offset);
return -1; return -1;
} }
...@@ -809,7 +809,7 @@ static CYTHON_INLINE int __Pyx_GetBufferAndValidate( ...@@ -809,7 +809,7 @@ static CYTHON_INLINE int __Pyx_GetBufferAndValidate(
} }
if ((unsigned)buf->itemsize != dtype->size) { if ((unsigned)buf->itemsize != dtype->size) {
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"Item size of buffer (%" PY_FORMAT_SIZE_T "d byte%s) does not match size of '%s' (%" PY_FORMAT_SIZE_T "d byte%s)", "Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_T "d byte%s)",
buf->itemsize, (buf->itemsize > 1) ? "s" : "", buf->itemsize, (buf->itemsize > 1) ? "s" : "",
dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : ""); dtype->name, (Py_ssize_t)dtype->size, (dtype->size > 1) ? "s" : "");
goto fail; goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment