summaryrefslogtreecommitdiff
path: root/tests/core
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2018-11-23 19:26:24 +0100
committerPatrick Steinhardt <ps@pks.im>2018-11-28 15:22:27 +0100
commit852bc9f4967d3bd70a284794ff486253e37c6980 (patch)
tree5c4857b20cc036e281a3913019924bb4ba4f4feb /tests/core
parent5bfb3b58e37fc35a0838ca2fa8b38941e056cfcc (diff)
downloadlibgit2-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 'tests/core')
-rw-r--r--tests/core/oidmap.c8
-rw-r--r--tests/core/strmap.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/tests/core/oidmap.c b/tests/core/oidmap.c
index 617da5483..b5f6f99e1 100644
--- a/tests/core/oidmap.c
+++ b/tests/core/oidmap.c
@@ -28,7 +28,7 @@ void test_core_oidmap__basic(void)
cl_assert(map != NULL);
for (i = 0; i < NITEMS; ++i) {
- khiter_t pos;
+ size_t pos;
int ret;
pos = git_oidmap_lookup_index(map, &items[i].oid);
@@ -42,7 +42,7 @@ void test_core_oidmap__basic(void)
for (i = 0; i < NITEMS; ++i) {
- khiter_t pos;
+ size_t pos;
pos = git_oidmap_lookup_index(map, &items[i].oid);
cl_assert(git_oidmap_valid_index(map, pos));
@@ -82,7 +82,7 @@ void test_core_oidmap__hash_collision(void)
cl_assert(map != NULL);
for (i = 0; i < NITEMS; ++i) {
- khiter_t pos;
+ size_t pos;
int ret;
pos = git_oidmap_lookup_index(map, &items[i].oid);
@@ -96,7 +96,7 @@ void test_core_oidmap__hash_collision(void)
for (i = 0; i < NITEMS; ++i) {
- khiter_t pos;
+ size_t pos;
pos = git_oidmap_lookup_index(map, &items[i].oid);
cl_assert(git_oidmap_valid_index(map, pos));
diff --git a/tests/core/strmap.c b/tests/core/strmap.c
index 2fa594d43..64f516452 100644
--- a/tests/core/strmap.c
+++ b/tests/core/strmap.c
@@ -60,7 +60,7 @@ void test_core_strmap__1(void)
void test_core_strmap__2(void)
{
- khiter_t pos;
+ size_t pos;
int i;
char *str;