Commit 45e890be authored by cgohlke's avatar cgohlke Committed by GitHub

Fix casting ssize_t to unsigned

parent 90736d26
...@@ -200,7 +200,7 @@ static int __Pyx__GetBufferAndValidate( ...@@ -200,7 +200,7 @@ static int __Pyx__GetBufferAndValidate(
__Pyx_BufFmt_Init(&ctx, stack, dtype); __Pyx_BufFmt_Init(&ctx, stack, dtype);
if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail; if (!__Pyx_BufFmt_CheckString(&ctx, buf->format)) goto fail;
} }
if (unlikely((unsigned)buf->itemsize != dtype->size)) { if (unlikely((size_t)buf->itemsize != dtype->size)) {
PyErr_Format(PyExc_ValueError, PyErr_Format(PyExc_ValueError,
"Item size of buffer (%" CYTHON_FORMAT_SSIZE_T "d byte%s) does not match size of '%s' (%" CYTHON_FORMAT_SSIZE_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" : "",
......
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