Commit 7eed8d8f authored by Stefan Behnel's avatar Stefan Behnel

prevent CPython from swallowing the StopIteration return value in Coroutine.send() code

parent 918cc8a8
...@@ -560,8 +560,7 @@ static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { ...@@ -560,8 +560,7 @@ static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
#endif #endif
{ {
if (value == Py_None) if (value == Py_None)
// FIXME - is this the right thing to do? ret = Py_TYPE(yf)->tp_iternext(yf);
ret = PyIter_Next(yf);
else else
ret = __Pyx_PyObject_CallMethod1(yf, PYIDENT("send"), value); ret = __Pyx_PyObject_CallMethod1(yf, PYIDENT("send"), value);
} }
......
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