Commit 310a6313 authored by Stefan Behnel's avatar Stefan Behnel

Avoid C compiler warning about uninitialised "am_send" slots in Py3.10+.

parent 293fa610
......@@ -1005,6 +1005,7 @@ class SlotTable(object):
MethodSlot(unaryfunc, "am_await", "__await__", method_name_to_slot),
MethodSlot(unaryfunc, "am_aiter", "__aiter__", method_name_to_slot),
MethodSlot(unaryfunc, "am_anext", "__anext__", method_name_to_slot),
EmptySlot("am_send", ifdef="PY_VERSION_HEX >= 0x030A00A3"),
)
self.slot_table = (
......
......@@ -386,7 +386,10 @@ static PyType_Spec __pyx_AsyncGenType_spec = {
static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_as_async = {
0, /* am_await */
PyObject_SelfIter, /* am_aiter */
(unaryfunc)__Pyx_async_gen_anext /* am_anext */
(unaryfunc)__Pyx_async_gen_anext, /* am_anext */
#if PY_VERSION_HEX >= 0x030A00A3
0, /*am_send*/
#endif
};
#endif
......@@ -661,7 +664,10 @@ static PyType_Spec __pyx__PyAsyncGenASendType_spec = {
static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_asend_as_async = {
PyObject_SelfIter, /* am_await */
0, /* am_aiter */
0 /* am_anext */
0, /* am_anext */
#if PY_VERSION_HEX >= 0x030A00A3
0, /*am_send*/
#endif
};
#endif
......@@ -1135,7 +1141,10 @@ static PyType_Spec __pyx__PyAsyncGenAThrowType_spec = {
static __Pyx_PyAsyncMethodsStruct __Pyx_async_gen_athrow_as_async = {
PyObject_SelfIter, /* am_await */
0, /* am_aiter */
0 /* am_anext */
0, /* am_anext */
#if PY_VERSION_HEX >= 0x030A00A3
0, /*am_send*/
#endif
};
#endif
......
......@@ -1735,6 +1735,9 @@ static __Pyx_PyAsyncMethodsStruct __pyx_Coroutine_as_async = {
__Pyx_Coroutine_await, /*am_await*/
0, /*am_aiter*/
0, /*am_anext*/
#if PY_VERSION_HEX >= 0x030A00A3
0, /*am_send*/
#endif
};
#endif
......
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