citerators · Section 3
ccol_iter_next
NAME
ccol_iter_next - move a unified iterator on to the next element
LIBRARY
C Collections (libccollections, -lccollections)
SYNOPSIS
#include <ccollections/citerators.h> /* or any container header */ cmap_iterator *ccol_iter_next(it);
DESCRIPTION
ccol_iter_next moves the iterator to the next element by calling its ccol__next_fn callback. At the end of the sequence it destroys the iterator and returns NULL. The argument is evaluated exactly once.
PARAMETERS
it Iterator variable that ccol_iter_declare() declares, or an iterator
inside ccol_for_each().
RETURN VALUE
The new value of the iterator, or NULL after the last element.
NOTES
Once ccol_iter_next() has returned NULL the iterator is already destroyed, so do not call ccol_iter_destroy() on it after that.