From 7d69ea177200bda62b403eb9ead6eee2ba5abe52 Mon Sep 17 00:00:00 2001 From: Tucker Evans Date: Mon, 6 Jul 2020 20:07:45 -0400 Subject: Add reset key function for maps Allows changing the pointer to key when they are equivalent (by cmp function), to avoid memory leaks that could happen if we assumed either pointer was to be freed or overwritten. --- collections/map/map.h | 1 + 1 file changed, 1 insertion(+) (limited to 'collections/map/map.h') diff --git a/collections/map/map.h b/collections/map/map.h index b389d87..a5fc816 100644 --- a/collections/map/map.h +++ b/collections/map/map.h @@ -12,6 +12,7 @@ int map_size(map*); /*data*/ int map_insert(map*, void*, void*); +void* map_reset_key(map*, void*); /*memory*/ void map_clear(map*); -- cgit v1.1