8000 gh-105201: Add PyIter_NextItem() by erlend-aasland · Pull Request #122331 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-105201: Add PyIter_NextItem() #122331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 7, 2024
Merged
Prev Previous commit
Next Next commit
Address review: add PyIter_NextItem to the Limited API in 3.14
  • Loading branch information
erlend-aasland committed Jul 28, 2024
commit 636e39be3e683663eda983a6efd9fe84b2204fab
2 changes: 2 additions & 0 deletions Include/abstract.h
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,13 @@ PyAPI_FUNC(int) PyIter_Check(PyObject *);
This function always succeeds. */
PyAPI_FUNC(int) PyAIter_Check(PyObject *);

#if !defined(Py_LIMITED_API) || Py_LIMITED_API+0 >= 0x030e0000
/* Return 1 and set 'item' to the next item of iter on success.
* Return 0 and set 'item' to NULL when there are no remaining values.
* Return -1, set 'item' to NULL and set an exception on error.
*/
PyAPI_FUNC(int) PyIter_NextItem(PyObject *iter, PyObject **item);
#endif

/* Takes an iterator object and calls its tp_iternext slot,
returning the next value.
Expand Down
Loading
0