]> pd.if.org Git - nbds/blobdiff - map/map.c
more header file refactoring
[nbds] / map / map.c
index c4749b3cfc21f80eecfc43147f0000ee26ca52fd..0db50bdbcd3185ee275089f2ea6aef97b301fa4d 100644 (file)
--- a/map/map.c
+++ b/map/map.c
@@ -6,20 +6,18 @@
  */
 
 #include "common.h"
-#include "mlocal.h"
-#include "mem.h"
 #include "map.h"
+#include "mem.h"
 
 struct map {
     const map_impl_t *impl;
     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) { 
-    const map_impl_t *map_impl = map_type;
+map_t *map_alloc (const map_impl_t *map_impl, const datatype_t *key_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;
 }