From 639bcec3a5c642b70972b93d16f11cbca5f51431 Mon Sep 17 00:00:00 2001 From: Lisandro Dalcin Date: Mon, 6 Apr 2009 14:08:13 -0300 Subject: [PATCH] fix bug in __Pyx_SetItemInt_Fast --- Cython/Compiler/ExprNodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.26.2