/** * Return the number of specific elements in an hash_multimap */ size_t _hash_multimap_count_varg(const hash_multimap_t* cphmmap_map, va_list val_elemlist) { assert(cphmmap_map != NULL); _type_get_varg_value(&((hash_multimap_t*)cphmmap_map)->_pair_temp._t_typeinfofirst, val_elemlist, cphmmap_map->_pair_temp._pv_first); return _hashtable_count(&cphmmap_map->_t_hashtable, &cphmmap_map->_pair_temp); }
/** * Erase an element from a hashtable that match a specified element. */ size_t _hashtable_erase(_hashtable_t* pt_hashtable, const void* cpv_value) { size_t t_countsize = _hashtable_count(pt_hashtable, cpv_value); range_t t_range = _hashtable_equal_range(pt_hashtable, cpv_value); if (!_hashtable_iterator_equal(t_range.it_begin, _hashtable_end(pt_hashtable))) { _hashtable_erase_range(pt_hashtable, t_range.it_begin, t_range.it_end); } return t_countsize; }