]> git.ipfire.org Git - thirdparty/git.git/blobdiff - oidmap.c
hashmap: introduce hashmap_free_entries
[thirdparty/git.git] / oidmap.c
index 4942599391096d0ac016f49ebb081015440327d1..423aa014a33eda2c6b695906eb0c349552d9e2b8 100644 (file)
--- a/oidmap.c
+++ b/oidmap.c
@@ -25,7 +25,9 @@ void oidmap_free(struct oidmap *map, int free_entries)
 {
        if (!map)
                return;
-       hashmap_free(&map->map, free_entries);
+
+       /* TODO: make oidmap itself not depend on struct layouts */
+       hashmap_free_(&map->map, free_entries ? 0 : -1);
 }
 
 void *oidmap_get(const struct oidmap *map, const struct object_id *key)