diff options
| author | Patrick Steinhardt <ps@pks.im> | 2018-11-23 19:26:24 +0100 |
|---|---|---|
| committer | Patrick Steinhardt <ps@pks.im> | 2018-11-28 15:22:27 +0100 |
| commit | 852bc9f4967d3bd70a284794ff486253e37c6980 (patch) | |
| tree | 5c4857b20cc036e281a3913019924bb4ba4f4feb /src/pack.c | |
| parent | 5bfb3b58e37fc35a0838ca2fa8b38941e056cfcc (diff) | |
| download | libgit2-852bc9f4967d3bd70a284794ff486253e37c6980.tar.gz | |
khash: remove intricate knowledge of khash types
Instead of using the `khiter_t`, `git_strmap_iter` and `khint_t` types,
simply use `size_t` instead. This decouples code from the khash stuff
and makes it possible to move the khash includes into the implementation
files.
Diffstat (limited to 'src/pack.c')
| -rw-r--r-- | src/pack.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pack.c b/src/pack.c index 6f837cd64..02916f687 100644 --- a/src/pack.c +++ b/src/pack.c @@ -108,8 +108,8 @@ static int cache_init(git_pack_cache *cache) static git_pack_cache_entry *cache_get(git_pack_cache *cache, git_off_t offset) { - khiter_t k; git_pack_cache_entry *entry = NULL; + size_t k; if (git_mutex_lock(&cache->lock) < 0) return NULL; @@ -148,7 +148,7 @@ static int cache_add( { git_pack_cache_entry *entry; int error, exists = 0; - khiter_t k; + size_t k; if (base->len > GIT_PACK_CACHE_SIZE_LIMIT) return -1; @@ -954,8 +954,8 @@ git_off_t get_delta_base( } else if (type == GIT_OBJ_REF_DELTA) { /* If we have the cooperative cache, search in it first */ if (p->has_cache) { - khiter_t k; git_oid oid; + size_t k; git_oid_fromraw(&oid, base_info); k = git_oidmap_lookup_index(p->idx_cache, &oid); |
