Commit 219efb47 authored by Stefan Behnel's avatar Stefan Behnel

fix incorrect assumption about tuples returned in dict iteration (crashes in Py3)

--HG--
extra : transplant_source : %04E%21%DB%F8%D4%C0%FD%C7%11%5E%F1%28%C6%26R%E9%06%CE%FD
parent d83cb9e2
......@@ -142,16 +142,8 @@ static CYTHON_INLINE int __Pyx_unpack_tuple2(PyObject* tuple, PyObject** pvalue1
}
value1 = PyTuple_GET_ITEM(tuple, 0);
value2 = PyTuple_GET_ITEM(tuple, 1);
#if CYTHON_COMPILING_IN_CPYTHON
if (decref_tuple) {
PyTuple_SET_ITEM(tuple, 0, NULL);
PyTuple_SET_ITEM(tuple, 1, NULL);
} else
#endif
{
Py_INCREF(value1);
Py_INCREF(value2);
}
Py_INCREF(value1);
Py_INCREF(value2);
if (decref_tuple)
Py_DECREF(tuple);
}
......
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