X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=include%2Fhashtable.h;h=3fb5d6cff3ff3844a1d367e31208a139ffba3c30;hp=0a9ea209fe7ad5a8707fb1981b75235df8831e7d;hb=f3eb4799a11ceaeb47ab02034595b5d641c2f1c9;hpb=329b5ab58cde015f4faec1879d3106f635294dd6 diff --git a/include/hashtable.h b/include/hashtable.h index 0a9ea20..3fb5d6c 100644 --- a/include/hashtable.h +++ b/include/hashtable.h @@ -7,15 +7,15 @@ typedef struct ht hashtable_t; typedef struct ht_iter ht_iter_t; hashtable_t * ht_alloc (const datatype_t *key_type); -uint64_t ht_cas (hashtable_t *ht, void *key, uint64_t expected_val, uint64_t val); -uint64_t ht_get (hashtable_t *ht, void *key); -uint64_t ht_remove (hashtable_t *ht, void *key); -uint64_t ht_count (hashtable_t *ht); -void ht_print (hashtable_t *ht); -void ht_free (hashtable_t *ht); +map_val_t ht_cas (hashtable_t *ht, map_key_t key, map_val_t expected_val, map_val_t val); +map_val_t ht_get (hashtable_t *ht, map_key_t key); +map_val_t ht_remove (hashtable_t *ht, map_key_t key); +size_t ht_count (hashtable_t *ht); +void ht_print (hashtable_t *ht); +void ht_free (hashtable_t *ht); -ht_iter_t * ht_iter_begin (hashtable_t *ht, void *key); -uint64_t ht_iter_next (ht_iter_t *iter, void **key_ptr); +ht_iter_t * ht_iter_begin (hashtable_t *ht, map_key_t key); +map_val_t ht_iter_next (ht_iter_t *iter, map_key_t *key_ptr); void ht_iter_free (ht_iter_t *iter); static const map_impl_t ht_map_impl = {