Beispiel #1
0
/**
 * inserts an array of unique element into a hash_set.
 */
void hash_set_insert_array(hash_set_t* phset_set, const void* cpv_array, size_t t_count)
{
    assert(phset_set != NULL);
    assert(cpv_array != NULL);

    _hashtable_insert_unique_array(&phset_set->_t_hashtable, cpv_array, t_count);
}
Beispiel #2
0
/**
 * Initialize hashtable container with specific array.
 */
void _hashtable_init_copy_unique_array(
    _hashtable_t* pt_dest, const void* cpv_array, size_t t_count, size_t t_bucketcount,
    ufun_t ufun_hash, bfun_t bfun_compare)
{
    assert(pt_dest != NULL);
    assert(_hashtable_is_created(pt_dest));
    assert(cpv_array != NULL);

    _hashtable_init(pt_dest, t_bucketcount, ufun_hash, bfun_compare);
    _hashtable_insert_unique_array(pt_dest, cpv_array, t_count);
}