Commit d9cf7516 authored by Robert Bradshaw's avatar Robert Bradshaw Committed by GitHub

Merge pull request #2815 from cgohlke/patch-1

Fix casting ssize_t to unsigned
parents 452627ce 45e890be
......@@ -200,7 +200,7 @@ static int __Pyx__GetBufferAndValidate(
__Pyx_BufFmt_Init(&ctx, stack, dtype);
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,
"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" : "",
......
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