diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2017-08-19 12:05:49 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2017-08-19 12:05:49 +0200 |
commit | 60f7d3b590db3788c10503956a33ab61b78a875b (patch) | |
tree | 89ea9a9bc07c07fb0b1deaf5be47db88cdbc2286 /Cython/Utility/StringTools.c | |
parent | 2d1ca079780015f431c8e5286b98a5c433feb9a4 (diff) | |
download | cython-60f7d3b590db3788c10503956a33ab61b78a875b.tar.gz |
Add missing cast to avoid a compiler warning on platforms where char is unsigned.
Diffstat (limited to 'Cython/Utility/StringTools.c')
-rw-r--r-- | Cython/Utility/StringTools.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/StringTools.c b/Cython/Utility/StringTools.c index 5ce24c736..14bf81a67 100644 --- a/Cython/Utility/StringTools.c +++ b/Cython/Utility/StringTools.c @@ -746,7 +746,7 @@ static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t i Py_ssize_t size = PyBytes_GET_SIZE(bytes); if (unlikely(index >= size) | ((index < 0) & unlikely(index < -size))) { PyErr_SetString(PyExc_IndexError, "string index out of range"); - return -1; + return (char) -1; } } if (index < 0) |