Commit fc6d44b9 authored by Stefan Behnel's avatar Stefan Behnel

Implement a fake "cr_frame" property for Cython async coroutines that always...

Implement a fake "cr_frame" property for Cython async coroutines that always returns None, just to prevent an AttributeError.
Closes #2000.
parent 2ea2238f
...@@ -1226,6 +1226,13 @@ static void __Pyx_Coroutine_del(PyObject *self) { ...@@ -1226,6 +1226,13 @@ static void __Pyx_Coroutine_del(PyObject *self) {
#endif #endif
} }
static PyObject *
__Pyx_Coroutine_get_frame(__pyx_CoroutineObject *self)
{
// Fake implementation that always returns None, but at least does not raise an AttributeError.
Py_RETURN_NONE;
}
static PyObject * static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self) __Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
{ {
...@@ -1499,6 +1506,8 @@ static PyGetSetDef __pyx_Coroutine_getsets[] = { ...@@ -1499,6 +1506,8 @@ static PyGetSetDef __pyx_Coroutine_getsets[] = {
(char*) PyDoc_STR("name of the coroutine"), 0}, (char*) PyDoc_STR("name of the coroutine"), 0},
{(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname, {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
(char*) PyDoc_STR("qualified name of the coroutine"), 0}, (char*) PyDoc_STR("qualified name of the coroutine"), 0},
{(char *) "cr_frame", (getter)__Pyx_Coroutine_get_frame, NULL,
(char*) PyDoc_STR("Frame of the coroutine"), 0},
{0, 0, 0, 0, 0} {0, 0, 0, 0, 0}
}; };
......
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