bpo-31861: Complete the C-API docs for PyObject_GetAiter and PyAiter_Check (GH-25004)
diff --git a/Doc/c-api/iter.rst b/Doc/c-api/iter.rst
index 5706777..63290e0 100644
--- a/Doc/c-api/iter.rst
+++ b/Doc/c-api/iter.rst
@@ -12,6 +12,12 @@
Return non-zero if the object *o* supports the iterator protocol, and ``0``
otherwise. This function always succeeds.
+.. c:function:: int PyAiter_Check(PyObject *o)
+
+ Returns non-zero if the object 'obj' provides :class:`AsyncIterator`
+ protocols, and ``0`` otherwise. This function always succeeds.
+
+ .. versionadded:: 3.10
.. c:function:: PyObject* PyIter_Next(PyObject *o)
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index 1100af1..42e3340 100644
--- a/Doc/c-api/object.rst
+++ b/Doc/c-api/object.rst
@@ -356,3 +356,14 @@
iterator for the object argument, or the object itself if the object is already
an iterator. Raises :exc:`TypeError` and returns ``NULL`` if the object cannot be
iterated.
+
+
+.. c:function:: PyObject* PyObject_GetAiter(PyObject *o)
+
+ This is the equivalent to the Python expression ``aiter(o)``. Takes an
+ :class:`AsyncIterable` object and returns an :class:`AsyncIterator` for it.
+ This is typically a new iterator but if the argument is an
+ :class:`AsyncIterator`, this returns itself. Raises :exc:`TypeError` and
+ returns ``NULL`` if the object cannot be iterated.
+
+ .. versionadded:: 3.10