# HG changeset patch # User Mike Becker # Date 1758985415 -7200 # Node ID c8af55ed4cae682ab9355e5271c5718d0c41d8fe # Parent a5c7d63b064dae6e80233feac989f8f004f02e73 simplify hash map iterator - resolves #727 diff -r a5c7d63b064d -r c8af55ed4cae src/hash_map.c --- a/src/hash_map.c Fri Sep 26 22:43:17 2025 +0200 +++ b/src/hash_map.c Sat Sep 27 17:03:35 2025 +0200 @@ -269,19 +269,12 @@ static void *cx_hash_map_iter_current_key(const void *it) { const CxMapIterator *iter = it; - struct cx_hash_map_element_s *elm = iter->elem; - return &elm->key; + return (void*) iter->entry.key; } static void *cx_hash_map_iter_current_value(const void *it) { const CxMapIterator *iter = it; - const CxMap *map = iter->map.c; - struct cx_hash_map_element_s *elm = iter->elem; - if (map->collection.store_pointer) { - return *(void **) elm->data; - } else { - return elm->data; - } + return iter->entry.value; } static bool cx_hash_map_iter_valid(const void *it) {