Commit 7640dbb4 authored by Stefan Behnel's avatar Stefan Behnel

Fix _PyGen_Send() usage in Windows.

parent 5ca5dad4
...@@ -783,12 +783,14 @@ static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) { ...@@ -783,12 +783,14 @@ static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
ret = __Pyx_async_gen_asend_send(yf, value); ret = __Pyx_async_gen_asend_send(yf, value);
} else } else
#endif #endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (!defined(_MSC_VER) || PY_VERSION_HEX >= 0x03060000)
// _PyGen_Send() is not exported before Py3.6
if (PyGen_CheckExact(yf)) { if (PyGen_CheckExact(yf)) {
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 CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (!defined(_MSC_VER) || PY_VERSION_HEX >= 0x03060000)
// _PyGen_Send() is not exported before Py3.6
if (PyCoro_CheckExact(yf)) { if (PyCoro_CheckExact(yf)) {
ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value); ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
} else } else
...@@ -883,7 +885,8 @@ static PyObject *__Pyx_Generator_Next(PyObject *self) { ...@@ -883,7 +885,8 @@ static PyObject *__Pyx_Generator_Next(PyObject *self) {
ret = __Pyx_Generator_Next(yf); ret = __Pyx_Generator_Next(yf);
} else } else
#endif #endif
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (!defined(_MSC_VER) || PY_VERSION_HEX >= 0x03060000)
// _PyGen_Send() is not exported before Py3.6
if (PyGen_CheckExact(yf)) { if (PyGen_CheckExact(yf)) {
ret = _PyGen_Send((PyGenObject*)yf, NULL); ret = _PyGen_Send((PyGenObject*)yf, NULL);
} else } else
......
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