summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2015-04-22 18:53:19 +0200
committerStefan Behnel <stefan_ml@behnel.de>2015-04-22 18:53:19 +0200
commit38c4c7ddd5d8ffd0f805d407db1c6decc0de136d (patch)
treee5ee1d04df4dfab28c51e3e06341d17c1a30a063
parentff15b2f7fe298b93e25903ef5d11244a21720378 (diff)
downloadcython-38c4c7ddd5d8ffd0f805d407db1c6decc0de136d.tar.gz
fix stupid C-API misuse: accidentally passed a NULL pointer to PyObject_GetItem() instead of a 0 integer index to PySequence_GetItem()
-rw-r--r--Cython/Utility/Generator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Utility/Generator.c b/Cython/Utility/Generator.c
index a37f097b6..c80ce5e40 100644
--- a/Cython/Utility/Generator.c
+++ b/Cython/Utility/Generator.c
@@ -151,7 +151,7 @@ static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
PyObject* args = PyObject_GetAttr(ev, PYIDENT("args"));
Py_DECREF(ev);
if (likely(args)) {
- value = PyObject_GetItem(args, 0);
+ value = PySequence_GetItem(args, 0);
Py_DECREF(args);
}
if (unlikely(!value)) {