Commit 807d2939 authored by Stefan Behnel's avatar Stefan Behnel

remove the now redundant None check in __Pyx_GetItemInt_[List|Tuple]_Fast() utility functions

parent c8f61a66
...@@ -9801,17 +9801,15 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j ...@@ -9801,17 +9801,15 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j
__Pyx_GetItemInt_Generic(o, to_py_func(i))) __Pyx_GetItemInt_Generic(o, to_py_func(i)))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_%(type)s_Fast(PyObject *o, Py_ssize_t i) { static CYTHON_INLINE PyObject *__Pyx_GetItemInt_%(type)s_Fast(PyObject *o, Py_ssize_t i) {
if (likely(o != Py_None)) { if (likely((0 <= i) & (i < Py%(type)s_GET_SIZE(o)))) {
if (likely((0 <= i) & (i < Py%(type)s_GET_SIZE(o)))) { PyObject *r = Py%(type)s_GET_ITEM(o, i);
PyObject *r = Py%(type)s_GET_ITEM(o, i); Py_INCREF(r);
Py_INCREF(r); return r;
return r; }
} else if ((-Py%(type)s_GET_SIZE(o) <= i) & (i < 0)) {
else if ((-Py%(type)s_GET_SIZE(o) <= i) & (i < 0)) { PyObject *r = Py%(type)s_GET_ITEM(o, Py%(type)s_GET_SIZE(o) + i);
PyObject *r = Py%(type)s_GET_ITEM(o, Py%(type)s_GET_SIZE(o) + i); Py_INCREF(r);
Py_INCREF(r); return r;
return r;
}
} }
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
} }
...@@ -9847,8 +9845,6 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) ...@@ -9847,8 +9845,6 @@ static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i)
} }
return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
} }
""",
impl = """
""") """)
......
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