From 07ecd4334f196e00eb64d7f9fa2e60a653ed696f Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Sat, 31 Dec 2022 03:11:53 +0100 Subject: Use private members and update FOREACH macros --- examples/gehashmap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/gehashmap.c') 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); -- cgit v1.2.3