mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-06 11:19:47 +00:00
khash: avoid using kh_clear
directly
This commit is contained in:
parent
a853c52723
commit
c37b069b9f
@ -88,7 +88,7 @@ static void clear_cache(git_cache *cache)
|
|||||||
git_cached_obj_decref(evict);
|
git_cached_obj_decref(evict);
|
||||||
});
|
});
|
||||||
|
|
||||||
kh_clear(oid, cache->map);
|
git_oidmap_clear(cache->map);
|
||||||
git_atomic_ssize_add(&git_cache__current_storage, -cache->used_memory);
|
git_atomic_ssize_add(&git_cache__current_storage, -cache->used_memory);
|
||||||
cache->used_memory = 0;
|
cache->used_memory = 0;
|
||||||
}
|
}
|
||||||
|
@ -197,7 +197,7 @@ static void rehash(git_packbuilder *pb)
|
|||||||
size_t i;
|
size_t i;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
kh_clear(oid, pb->object_ix);
|
git_oidmap_clear(pb->object_ix);
|
||||||
for (i = 0, po = pb->object_list; i < pb->nr_objects; i++, po++) {
|
for (i = 0, po = pb->object_list; i < pb->nr_objects; i++, po++) {
|
||||||
pos = kh_put(oid, pb->object_ix, &po->id, &ret);
|
pos = kh_put(oid, pb->object_ix, &po->id, &ret);
|
||||||
kh_value(pb->object_ix, pos) = po;
|
kh_value(pb->object_ix, pos) = po;
|
||||||
|
Loading…
Reference in New Issue
Block a user