cp_hashlist_callback(3)

cp_hashlist(3) libcprops - cp_hashlist cp_hashlist(3)

NAME

cp_hashlist_callback - invoke a callback on hashlist mappings

SYNOPSIS

#include <cprops/hashlist.h>

int cp_hashlist_callback(cp_hashlist *list, int (*cb)(void *key, void *value, void *id), void *id);

DESCRIPTION

cp_hashlist_callback iterates over all entries in a hashlist, invoking the callback function cb on each key / value pair in the list. In addition the id parameter is passed to the callback function with no change.

Iteration stops if the callback returns non-zero or after the callback has been invoked on all mappings.

RETURN VALUE

cp_hashlist_callback returns 0 on success or -1 on locking failure.

OCTOBER 2005 libcprops.0.0.3