Commit 1691f2b4 authored by Robert Bradshaw's avatar Robert Bradshaw

Get rid of "comparison between signed and unsigned" warning.

parent a3deac02
......@@ -454,7 +454,7 @@ static CYTHON_INLINE PyObject* {{TO_PY_FUNCTION}}({{TYPE}} value) {
{ \
value_type value = func(x); \
if (sizeof(type) < sizeof(value_type)) { \
if (unlikely(value != (type) value)) { \
if (unlikely(value != (value_type) (type) value)) { \
PyErr_SetString(PyExc_OverflowError, \
(is_unsigned && unlikely(value < 0)) ? \
"can't convert negative value to " #type : \
......
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