CK_ARRAY_FOREACH(3)

CK_ARRAY_FOREACH3

Iterate through an array

Usage

#include <ck_array.h>

bool

CK_ARRAY_FOREACH(ck_array_t *array, ck_array_iterator_t *iterator, void **b);

Library

Concurrency Kit (libck, -lck)

Overview

The CK_ARRAY_FOREACH(3) macro iterates through the array pointed to by array. A pointer to an iterator object must be specified by iterator and b must point to a void pointer.

Examples

#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.

Releases

Unchanged in 5 releases since Debian 8 (Jessie).

  1. 8–13

From libck-dev 0.7.2-6 in Debian 13 (Trixie). Parsed by carta from the page's mdoc source.