#ifndef CRITBIT_H_2809050e_f3c9_4363_8208_673da32e70f9 #define CRITBIT_H_2809050e_f3c9_4363_8208_673da32e70f9 #ifdef __cplusplus extern "C" { #endif #define TT_EMPTY_DICT TT_EMPTY extern int tt_dict_size(tt_arena_t *a, tt_node_ptr_t t); /* Returns TT_NO_PTR when key not present. Does not manipulate references. */ extern tt_node_ptr_t tt_dict_get(tt_arena_t *a, tt_node_ptr_t t, tt_atom_t key); /* Returns TT_NO_PTR when allocation failed. Otherwise, yields a dict. Grabs `trie` if required. */ extern tt_node_ptr_t tt_dict_set(tt_arena_t *a, tt_node_ptr_t t, tt_atom_t key, tt_node_ptr_t trie); extern tt_node_ptr_t tt_dict_remove(tt_arena_t *a, tt_node_ptr_t t, tt_atom_t key); extern void tt_dict_foreach(tt_arena_t *a, tt_node_ptr_t t, void *context, void (*f)(void *, tt_atom_t key, tt_node_ptr_t trie)); #ifdef __cplusplus } #endif #endif