summaryrefslogtreecommitdiff
path: root/src/strmap.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-01-25 15:31:12 +0100
committerPatrick Steinhardt <ps@pks.im>2017-02-17 11:41:06 +0100
commitf31cb45ad2ca46cc743dfadf5ac8b916cbe4ea9c (patch)
treeed98640b9181f3cfae95e63711ca7200c7e7be3d /src/strmap.h
parenta8cd560b10149208aabcfe515b2e1b6c5be6388f (diff)
downloadlibgit2-f31cb45ad2ca46cc743dfadf5ac8b916cbe4ea9c.tar.gz
khash: avoid using `kh_put` directly
Diffstat (limited to 'src/strmap.h')
-rw-r--r--src/strmap.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/strmap.h b/src/strmap.h
index 9fdab95bb..4c5f888ae 100644
--- a/src/strmap.h
+++ b/src/strmap.h
@@ -42,6 +42,8 @@ typedef khiter_t git_strmap_iter;
#define git_strmap_set_value_at(h, idx, v) kh_val(h, idx) = v
#define git_strmap_delete_at(h, idx) kh_del(str, h, idx)
+#define git_strmap_put(h, k, err) kh_put(str, h, k, err)
+
#define git_strmap_insert(h, key, val, rval) do { \
khiter_t __pos = kh_put(str, h, key, &rval); \
if (rval >= 0) { \