Source

opycaml / misc.idl.in

1
2
3
4
5
6
7
8
9
// -------------------------- iterator protocol

boolean PyIter_Check(PyObject *o);
// Return true if the object o supports the iterator protocol.

[new] PyObject* PyIter_Next(PyIterObject *o);
// Return value: New reference.
// Return the next value from the iteration o. If the object is an iterator, this retrieves the next value from the iteration, and returns NULL with no exception set if there are no remaining items. If the object is not an iterator, TypeError is raised, or if there is an error in retrieving the item, returns NULL and passes along the exception.