diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-09-07 11:43:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-07 11:43:33 (GMT) |
commit | 53257cf19fc06fff446815b3278d4b80ec3e7ba3 (patch) | |
tree | d8277cc47a08212a2fa891552e7657d26a7bc79a /Include | |
parent | fc840736e54da0557616882012f362b809490165 (diff) | |
download | cpython-53257cf19fc06fff446815b3278d4b80ec3e7ba3.zip cpython-53257cf19fc06fff446815b3278d4b80ec3e7ba3.tar.gz cpython-53257cf19fc06fff446815b3278d4b80ec3e7ba3.tar.bz2 |
bpo-45123: PyAiter_Check and PyObject_GetAiter fix & rename. (GH-28194) (GH-28199)
Fix PyAiter_Check to only check for the `__anext__` presense (not for
`__aiter__`). Rename `PyAiter_Check()` to `PyAIter_Check()`,
`PyObject_GetAiter()` -> `PyObject_GetAIter()`.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/abstract.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/abstract.h b/Include/abstract.h index 929861e..e8d3f92 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -374,7 +374,7 @@ PyAPI_FUNC(PyObject *) PyObject_GetIter(PyObject *); /* Takes an AsyncIterable object and returns an AsyncIterator for it. This is typically a new iterator but if the argument is an AsyncIterator, this returns itself. */ -PyAPI_FUNC(PyObject *) PyObject_GetAiter(PyObject *); +PyAPI_FUNC(PyObject *) PyObject_GetAIter(PyObject *); /* Returns non-zero if the object 'obj' provides iterator protocols, and 0 otherwise. @@ -384,7 +384,7 @@ PyAPI_FUNC(int) PyIter_Check(PyObject *); /* Returns non-zero if the object 'obj' provides AsyncIterator protocols, and 0 otherwise. This function always succeeds. */ -PyAPI_FUNC(int) PyAiter_Check(PyObject *); +PyAPI_FUNC(int) PyAIter_Check(PyObject *); /* Takes an iterator object and calls its tp_iternext slot, returning the next value. |