Commit 4f022cd7 authored by Stefan Behnel's avatar Stefan Behnel

Add missing cast to avoid a compiler warning on platforms where char is unsigned.

parent bd6c647e
...@@ -737,7 +737,7 @@ static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t i ...@@ -737,7 +737,7 @@ static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t i
Py_ssize_t size = PyBytes_GET_SIZE(bytes); Py_ssize_t size = PyBytes_GET_SIZE(bytes);
if (unlikely(index >= size) | ((index < 0) & unlikely(index < -size))) { if (unlikely(index >= size) | ((index < 0) & unlikely(index < -size))) {
PyErr_SetString(PyExc_IndexError, "string index out of range"); PyErr_SetString(PyExc_IndexError, "string index out of range");
return -1; return (char) -1;
} }
} }
if (index < 0) if (index < 0)
......
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