}
pointer
-ht_add(HashTable ht, pointer key)
+ht_add(HashTable ht, const void *key)
{
unsigned index = ht->hash(ht->cdata, key, ht->bucketBits);
struct xorg_list *bucket = &ht->buckets[index];
}
void
-ht_remove(HashTable ht, pointer key)
+ht_remove(HashTable ht, const void *key)
{
unsigned index = ht->hash(ht->cdata, key, ht->bucketBits);
struct xorg_list *bucket = &ht->buckets[index];
}
pointer
-ht_find(HashTable ht, pointer key)
+ht_find(HashTable ht, const void *key)
{
unsigned index = ht->hash(ht->cdata, key, ht->bucketBits);
struct xorg_list *bucket = &ht->buckets[index];
to avoid returning NULL. Obviously the data pointed cannot be
modified, as implied by dataSize being 0.
*/
-extern _X_EXPORT pointer ht_add(HashTable ht, pointer key);
+extern _X_EXPORT pointer ht_add(HashTable ht, const void *key);
/** @brief Removes a key from the hash table along with its
associated data, which will be free'd.
*/
-extern _X_EXPORT void ht_remove(HashTable ht, pointer key);
+extern _X_EXPORT void ht_remove(HashTable ht, const void *key);
/** @brief Finds the associated data of a key from the hash table.
use HtMember instead to determine if a key has been
inserted.
*/
-extern _X_EXPORT pointer ht_find(HashTable ht, pointer key);
+extern _X_EXPORT pointer ht_find(HashTable ht, const void *key);
/** @brief A generic hash function */
extern _X_EXPORT unsigned ht_generic_hash(void *cdata,