]> pd.if.org Git - nbds/blobdiff - map/map.c
all structures are parameterized by the datatype for the key
[nbds] / map / map.c
index c4749b3cfc21f80eecfc43147f0000ee26ca52fd..6602a9be05fe7e1983307367453cd7b28dc598e7 100644 (file)
--- a/map/map.c
+++ b/map/map.c
@@ -15,11 +15,11 @@ struct map {
     void *data;
 };
 
-map_t *map_alloc (map_type_t map_type, cmp_fun_t cmp_fun, hash_fun_t hash_fun, clone_fun_t clone_fun) { 
+map_t *map_alloc (map_type_t map_type, const datatype_t *key_type) { 
     const map_impl_t *map_impl = map_type;
     map_t *map = nbd_malloc(sizeof(map_t)); 
     map->impl  = map_impl;
-    map->data  = map->impl->alloc(cmp_fun, hash_fun, clone_fun);
+    map->data  = map->impl->alloc(key_type);
     return map;
 }