27struct ec_dict_elt_ref;
size_t ec_dict_len(const struct ec_dict *dict)
Get the length of a hash table.
bool ec_dict_has_key(const struct ec_dict *dict, const char *key)
Check if the hash table contains this key.
void ec_dict_free(struct ec_dict *dict)
Free a hash table and all its objects.
struct ec_dict * ec_dict(void)
Create a hash table.
void * ec_dict_iter_get_val(const struct ec_dict_elt_ref *iter)
Get the value of the current element.
struct ec_dict_elt_ref * ec_dict_iter_next(struct ec_dict_elt_ref *iter)
Make the iterator point to the next element in the hash table.
void * ec_dict_get(const struct ec_dict *dict, const char *key)
Get a value from the hash table.
struct ec_dict * ec_dict_dup(const struct ec_dict *dict)
Duplicate a hash table.
void(* ec_dict_elt_free_t)(void *)
Callback function for freeing dictionary elements.
const char * ec_dict_iter_get_key(const struct ec_dict_elt_ref *iter)
Get a pointer to the key of the current element.
struct ec_dict_elt_ref * ec_dict_iter(const struct ec_dict *dict)
Iterate the elements in the hash table.
int ec_dict_del(struct ec_dict *dict, const char *key)
Delete an object from the hash table.
void ec_dict_dump(FILE *out, const struct ec_dict *dict)
Dump a hash table.
int ec_dict_set(struct ec_dict *dict, const char *key, void *val, ec_dict_elt_free_t free_cb)
Add/replace an object in the hash table.