Commit 3aa55e65 authored by Stefan Behnel's avatar Stefan Behnel

also special Python coroutines in cygen.send() delegation

parent cea87ae3
...@@ -738,6 +738,11 @@ static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { ...@@ -738,6 +738,11 @@ static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
} else } else
#endif #endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact)
if (PyCoro_CheckExact(yf)) {
ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
} else
#endif
{ {
if (value == Py_None) if (value == Py_None)
ret = Py_TYPE(yf)->tp_iternext(yf); ret = Py_TYPE(yf)->tp_iternext(yf);
......
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