Ejemplo n.º 1
0
HASHTABLE* hashtable_alloc_flat(HASHTABLE* target,
                                int size,
                                int (*hashfn)(),
                                int (*cmpfn)())
{
    return hashtable_alloc_real(target, size, hashfn, cmpfn);
}
Ejemplo n.º 2
0
/**
 * Allocate a new hash table.
 *
 * The hashtable must have a size of at least one, however to be of any
 * practical use a larger size sould be chosen as the size relates to the number
 * of has buckets in the table.
 *
 * @param size          The size of the hash table, msut be > 0
 * @param hashfn        The user supplied hash function
 * @param cmpfn         The user supplied key comparison function
 * @return The hashtable table
 */
HASHTABLE *
hashtable_alloc(int size, int (*hashfn)(), int (*cmpfn)())
{
    return hashtable_alloc_real(NULL, size, hashfn, cmpfn);
}