mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-42085: Introduce dedicated entry in PyAsyncMethods for sending values (#22780)
This commit is contained in:
parent
e59b2deffd
commit
1e996c3a3b
13 changed files with 146 additions and 49 deletions
|
@ -199,6 +199,8 @@ sub-slots
|
|||
+---------------------------------------------------------+-----------------------------------+--------------+
|
||||
| :c:member:`~PyAsyncMethods.am_anext` | :c:type:`unaryfunc` | __anext__ |
|
||||
+---------------------------------------------------------+-----------------------------------+--------------+
|
||||
| :c:member:`~PyAsyncMethods.am_send` | :c:type:`sendfunc` | |
|
||||
+---------------------------------------------------------+-----------------------------------+--------------+
|
||||
| |
|
||||
+---------------------------------------------------------+-----------------------------------+--------------+
|
||||
| :c:member:`~PyNumberMethods.nb_add` | :c:type:`binaryfunc` | __add__ |
|
||||
|
@ -2304,6 +2306,7 @@ Async Object Structures
|
|||
unaryfunc am_await;
|
||||
unaryfunc am_aiter;
|
||||
unaryfunc am_anext;
|
||||
sendfunc am_send;
|
||||
} PyAsyncMethods;
|
||||
|
||||
.. c:member:: unaryfunc PyAsyncMethods.am_await
|
||||
|
@ -2337,6 +2340,15 @@ Async Object Structures
|
|||
Must return an :term:`awaitable` object. See :meth:`__anext__` for details.
|
||||
This slot may be set to ``NULL``.
|
||||
|
||||
.. c:member:: sendfunc PyAsyncMethods.am_send
|
||||
|
||||
The signature of this function is::
|
||||
|
||||
PySendResult am_send(PyObject *self, PyObject *arg, PyObject **result);
|
||||
|
||||
See :c:func:`PyIter_Send` for details.
|
||||
This slot may be set to ``NULL``.
|
||||
|
||||
|
||||
.. _slot-typedefs:
|
||||
|
||||
|
@ -2432,6 +2444,10 @@ Slot Type typedefs
|
|||
|
||||
.. c:type:: PyObject *(*binaryfunc)(PyObject *, PyObject *)
|
||||
|
||||
.. c:type:: PySendResult (*sendfunc)(PyObject *, PyObject *, PyObject **)
|
||||
|
||||
See :c:member:`~PyAsyncMethods.am_send`.
|
||||
|
||||
.. c:type:: PyObject *(*ternaryfunc)(PyObject *, PyObject *, PyObject *)
|
||||
|
||||
.. c:type:: PyObject *(*ssizeargfunc)(PyObject *, Py_ssize_t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue