Exemplo n.º 1
0
/**
 * Swap the datas of first hash_set and second hash_set.
 */
void hash_set_swap(hash_set_t* phset_first, hash_set_t* phset_second)
{
    assert(phset_first != NULL);
    assert(phset_second != NULL);

    _hashtable_swap(&phset_first->_t_hashtable, &phset_second->_t_hashtable);
}
Exemplo n.º 2
0
/**
 * Swap the datas of first hash_multimap and second hash_multimap.
 */
void hash_multimap_swap(hash_multimap_t* phmmap_first, hash_multimap_t* phmmap_second)
{
    assert(phmmap_first != NULL);
    assert(phmmap_second != NULL);
    assert(_pair_is_inited(&phmmap_first->_pair_temp));
    assert(_pair_is_inited(&phmmap_second->_pair_temp));
    assert(_hash_multimap_same_pair_type_ex(&phmmap_first->_pair_temp, &phmmap_second->_pair_temp));

    _hashtable_swap(&phmmap_first->_t_hashtable, &phmmap_second->_t_hashtable);
}