summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2022-12-31 03:11:53 +0100
committerThomas Voss <mail@thomasvoss.com> 2022-12-31 03:11:53 +0100
commit07ecd4334f196e00eb64d7f9fa2e60a653ed696f (patch)
tree140693525370cffc679b4b535ba24c58d0f22a9b /examples
parent06e98187cc5cb407b44debbebb804cb214221f1a (diff)
Use private members and update FOREACH macros
Diffstat (limited to 'examples')
-rw-r--r--examples/gehashmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/gehashmap.c b/examples/gehashmap.c
index 17f8eb4..d84f363 100644
--- a/examples/gehashmap.c
+++ b/examples/gehashmap.c
@@ -68,9 +68,9 @@ main(void)
atoimap_get(map_a, "THOMAS VOẞ", &i); printf("THOMAS VOẞ -> %d\n", i);
atoimap_get(map_a, "Thomas Voss", &i); printf("Thomas Voss -> %d\n", i);
- GEHASHMAP_FOREACH_SAFE(entry, tmp, map_a)
+ GEHASHMAP_FOREACH_SAFE(entry, tmp, *map_a)
atoimap_remove(map_a, entry->key);
- GEHASHMAP_FOREACH(entry, map_a)
+ GEHASHMAP_FOREACH(entry, *map_a)
puts(entry->key);
itoumap_set(map_b, -42, +42);
@@ -101,7 +101,7 @@ main(void)
atoimap_set(map_a, strdup("THOMAS VOẞ"), 6);
atoimap_set(map_a, strdup("Thomas Voss"), 7);
- GEHASHMAP_FOREACH(entry, map_a)
+ GEHASHMAP_FOREACH(entry, *map_a)
free(entry->key);
atoimap_free(map_a);