EC_DICT_ITER(3)

NAME
ec_dict_iter - Iterate the elements in the hash table.

SYNOPSIS
#include <ecoli/dict.h>

struct ec_dict_elt_ref * ec_dict_iter(
    const struct ec_dict   *dict   /* The hash table. */
);

DESCRIPTION

The typical usage is as below:

for (iter = ec_dict_iter(dict);
     iter != NULL;
     iter = ec_dict_iter_next(iter)) {
   printf("  %s: %p,
       ec_dict_iter_get_key(iter),
       ec_dict_iter_get_val(iter));
}

RETURN VALUE

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

SEE ALSO

ec_dict_has_key(3), ec_dict_free(3), ec_dict_iter_get_val(3), ec_dict_len(3), ec_dict_dup(3), ec_dict_del(3), ec_dict(3), ec_dict_set(3), ec_dict_get(3), ec_dict_dump(3), ec_dict_iter_next(3), ec_dict_iter_get_key(3)

COPYRIGHT

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