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/odb_mempack.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/odb_mempack.c')
-rw-r--r-- | src/odb_mempack.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/odb_mempack.c b/src/odb_mempack.c index e351d4df9..4e54735e9 100644 --- a/src/odb_mempack.c +++ b/src/odb_mempack.c @@ -37,7 +37,7 @@ static int impl__write(git_odb_backend *_backend, const git_oid *oid, const void { struct memory_packer_db *db = (struct memory_packer_db *)_backend; struct memobject *obj = NULL; - khiter_t pos; + size_t pos; size_t alloc_len; int rval; @@ -80,7 +80,7 @@ static int impl__read(void **buffer_p, size_t *len_p, git_otype *type_p, git_odb { struct memory_packer_db *db = (struct memory_packer_db *)backend; struct memobject *obj = NULL; - khiter_t pos; + size_t pos; pos = git_oidmap_lookup_index(db->objects, oid); if (!git_oidmap_valid_index(db->objects, pos)) @@ -101,7 +101,7 @@ static int impl__read_header(size_t *len_p, git_otype *type_p, git_odb_backend * { struct memory_packer_db *db = (struct memory_packer_db *)backend; struct memobject *obj = NULL; - khiter_t pos; + size_t pos; pos = git_oidmap_lookup_index(db->objects, oid); if (!git_oidmap_valid_index(db->objects, pos)) |