/** * Destroy hash_multimap container auxiliary function. */ void _hash_multimap_destroy_auxiliary(hash_multimap_t* phmmap_map) { assert(phmmap_map != NULL); _pair_destroy_auxiliary(&phmmap_map->_pair_temp); _hashtable_destroy_auxiliary(&phmmap_map->_t_hashtable); phmmap_map->_bfun_keycompare = NULL; phmmap_map->_bfun_valuecompare = NULL; }
/** * Destroy map container auxiliary function. */ void _map_destroy_auxiliary(map_t* pmap_map) { assert(pmap_map != NULL); _pair_destroy_auxiliary(&pmap_map->_pair_temp); #ifdef CSTL_MAP_AVL_TREE _avl_tree_destroy_auxiliary(&pmap_map->_t_tree); #else _rb_tree_destroy_auxiliary(&pmap_map->_t_tree); #endif pmap_map->_bfun_keycompare = NULL; pmap_map->_bfun_valuecompare = NULL; }
/** * Destroy pair. */ void pair_destroy(pair_t* ppair_pair) { _pair_destroy_auxiliary(ppair_pair); free(ppair_pair); }
void _type_destroy_pair(const void* cpv_input, void* pv_output) { assert(cpv_input != NULL && pv_output != NULL); _pair_destroy_auxiliary((pair_t*)cpv_input); *(bool_t*)pv_output = true; }