diff options
author | Ian Henriksen <insertinterestingnamehere@gmail.com> | 2016-03-03 21:42:37 -0700 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2016-03-24 14:27:14 +0100 |
commit | 565061a99a467de189b606a95619bfe59e0f014d (patch) | |
tree | 8c0a378995e16e36bb7786b086994b7e39788d90 | |
parent | 201feed25881488eb10a96b0dba7ea858434dddb (diff) | |
download | cython-565061a99a467de189b606a95619bfe59e0f014d.tar.gz |
Silence a warning about applying unary minus to an unsigned integer
with MSVC.
-rw-r--r-- | Cython/Utility/TypeConversion.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/TypeConversion.c b/Cython/Utility/TypeConversion.c index c601b540e..0590522b7 100644 --- a/Cython/Utility/TypeConversion.c +++ b/Cython/Utility/TypeConversion.c @@ -667,7 +667,7 @@ static CYTHON_INLINE {{TYPE}} {{FROM_PY_FUNCTION}}(PyObject *x) { const digit* digits = ((PyLongObject*)x)->ob_digit; switch (Py_SIZE(x)) { case 0: return ({{TYPE}}) 0; - case -1: __PYX_VERIFY_RETURN_INT({{TYPE}}, sdigit, (sdigit) -digits[0]) + case -1: __PYX_VERIFY_RETURN_INT({{TYPE}}, sdigit, (sdigit) (-(sdigit)digits[0])) case 1: __PYX_VERIFY_RETURN_INT({{TYPE}}, digit, +digits[0]) {{for _size in (2, 3, 4)}} {{for _case in (-_size, _size)}} |