From: Lisandro Dalcin Date: Mon, 6 Apr 2009 17:08:13 +0000 (-0300) Subject: fix bug in __Pyx_SetItemInt_Fast X-Git-Tag: 0.11.1.beta~11^2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=639bcec3a5c642b70972b93d16f11cbca5f51431;p=cython.git fix bug in __Pyx_SetItemInt_Fast --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 0b03f894..f710f80c 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -5500,8 +5500,8 @@ static INLINE int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v static INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int fits_long) { if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) { - Py_DECREF(PyList_GET_ITEM(o, i)); Py_INCREF(v); + Py_DECREF(PyList_GET_ITEM(o, i)); PyList_SET_ITEM(o, i, v); return 1; }