summaryrefslogtreecommitdiff
path: root/src/strmap.h
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2017-01-27 14:05:10 +0100
committerPatrick Steinhardt <ps@pks.im>2017-02-17 11:41:06 +0100
commit85d2748c6f75bd810c7376647c8ae32984b5e3bb (patch)
treea4468d9df7903b1659fb5eca622d453ab3acefaf /src/strmap.h
parentf31cb45ad2ca46cc743dfadf5ac8b916cbe4ea9c (diff)
downloadlibgit2-85d2748c6f75bd810c7376647c8ae32984b5e3bb.tar.gz
khash: avoid using `kh_key`/`kh_val` as lvalue
Diffstat (limited to 'src/strmap.h')
-rw-r--r--src/strmap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/strmap.h b/src/strmap.h
index 4c5f888ae..7b9695695 100644
--- a/src/strmap.h
+++ b/src/strmap.h
@@ -38,6 +38,7 @@ typedef khiter_t git_strmap_iter;
#define git_strmap_has_data(h, idx) kh_exist(h, idx)
#define git_strmap_key(h, idx) kh_key(h, idx)
+#define git_strmap_set_key_at(h, idx, k) kh_val(h, idx) = k
#define git_strmap_value_at(h, idx) kh_val(h, idx)
#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)