EC_HTABLE_ITER(3)

NAME
ec_htable_iter - Iterate the elements in the hash table.

SYNOPSIS
#include <ecoli/htable.h>

struct ec_htable_elt_ref * ec_htable_iter(
    const struct ec_htable   *htable   /* The hash table. */
);

DESCRIPTION

The typical usage is as below:

for (iter = ec_htable_iter(htable);
     iter != NULL;
     iter = ec_htable_iter_next(iter)) {
   printf("  %s: %p,
       ec_htable_iter_get_key(iter),
       ec_htable_iter_get_val(iter));
}

RETURN VALUE

An iterator element, or NULL if the htable is empty.

SEE ALSO

ec_htable_iter_get_key(3), ec_htable_iter_get_val(3), ec_htable_iter_next(3), ec_htable_has_key(3), ec_htable_len(3), ec_htable(3), ec_htable_force_seed(3), ec_htable_dup(3), ec_htable_iter_get_key_len(3), ec_htable_dump(3), ec_htable_del(3), ec_htable_set(3), ec_htable_get(3), ec_htable_free(3),

COPYRIGHT

Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.