Merge pull request #197 from dvdhrm/hashmap

hashmap: fix iterators to not skip entries
This commit is contained in:
Michal Schmidt
2015-06-16 14:44:43 +02:00
9 changed files with 56 additions and 41 deletions
+1
View File
@@ -465,6 +465,7 @@ static void test_hashmap_foreach_key(void) {
hashmap_put(m, key, (void*) (const char*) "my dummy val");
HASHMAP_FOREACH_KEY(s, key, m, i) {
assert(s);
if (!key_found[0] && streq(key, "key 1"))
key_found[0] = true;
else if (!key_found[1] && streq(key, "key 2"))