Commit f22166ff authored by Stefan Behnel's avatar Stefan Behnel

"< 0" comparison is always needed, not only in CPython and PyPy (in case we ever support more)

parent b1ef20ad
...@@ -560,7 +560,7 @@ static CYTHON_INLINE {{TYPE}} {{FROM_PY_FUNCTION}}(PyObject *x) { ...@@ -560,7 +560,7 @@ static CYTHON_INLINE {{TYPE}} {{FROM_PY_FUNCTION}}(PyObject *x) {
if (unlikely(Py_SIZE(x) < 0)) { if (unlikely(Py_SIZE(x) < 0)) {
goto raise_neg_overflow; goto raise_neg_overflow;
} }
#elif CYTHON_COMPILING_IN_PYPY #else
{ {
// misuse Py_False as a quick way to compare to a '0' int object in PyPy // misuse Py_False as a quick way to compare to a '0' int object in PyPy
int result = PyObject_RichCompareBool(x, Py_False, Py_LT); int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
......
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