CK_ARRAY_FOREACH(3)
iterate through an array
LIBRARY
Concurrency Kit (libck, -lck)
SYNOPSIS
In ck_array.h
Ft bool
Fn CK_ARRAY_FOREACH ck_array_t *array ck_array_iterator_t *iterator void **b
DESCRIPTION
The
Fn CK_ARRAY_FOREACH 3
macro iterates through the array pointed to by
Fa array .
A pointer to an iterator object must be specified by
Fa iterator
and
Fa b
must point to a void pointer.
EXAMPLE
#include <ck_array.h>
/* Assume this was already previously initialized. */
ck_array_t array;
void
example(void)
{
ck_array_iterator_t iterator;
void *pointer;
CK_ARRAY_FOREACH(&array, &iterator, &pointer) {
do_something(pointer);
}
}
RETURN VALUES
This macro has no return value.