コード例 #1
0
/**
 * 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;
}
コード例 #2
0
ファイル: cstl_map_private.c プロジェクト: coderXing/libcstl
/**
 * 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;
}
コード例 #3
0
/**
 * Destroy pair.
 */
void pair_destroy(pair_t* ppair_pair)
{
    _pair_destroy_auxiliary(ppair_pair);
    free(ppair_pair);
}
コード例 #4
0
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;
}