X-Git-Url: https://pd.if.org/git/?p=nbds;a=blobdiff_plain;f=map%2Fmap.c;h=0db50bdbcd3185ee275089f2ea6aef97b301fa4d;hp=6602a9be05fe7e1983307367453cd7b28dc598e7;hb=9d72edf41ce3a2ddbbe2d44afc23ef5ec53339c3;hpb=d26bac75802a324ed98c8d3d88cfb9eb87b3b35a diff --git a/map/map.c b/map/map.c index 6602a9b..0db50bd 100644 --- a/map/map.c +++ b/map/map.c @@ -6,17 +6,15 @@ */ #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, const datatype_t *key_type) { - 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(key_type);