X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=include%2Fhashtable.h;fp=include%2Fhashtable.h;h=9a32abc94746fc2bb966013572f7b209c688af4f;hp=9cffb7f9362e9dff409531516fa72818adf811fd;hb=9d72edf41ce3a2ddbbe2d44afc23ef5ec53339c3;hpb=d26bac75802a324ed98c8d3d88cfb9eb87b3b35a diff --git a/include/hashtable.h b/include/hashtable.h index 9cffb7f..9a32abc 100644 --- a/include/hashtable.h +++ b/include/hashtable.h @@ -1,7 +1,7 @@ #ifndef HASHTABLE_H #define HASHTABLE_H -#include "datatype.h" +#include "map.h" typedef struct ht hashtable_t; @@ -13,4 +13,9 @@ uint64_t ht_count (hashtable_t *ht); void ht_print (hashtable_t *ht); void ht_free (hashtable_t *ht); +static const map_impl_t ht_map_impl = { + (map_alloc_t)ht_alloc, (map_cas_t)ht_cas, (map_get_t)ht_get, (map_remove_t)ht_remove, + (map_count_t)ht_count, (map_print_t)ht_print, (map_free_t)ht_free +}; + #endif//HASHTABLE_H