aboutsummaryrefslogtreecommitdiff
path: root/map.h
diff options
context:
space:
mode:
authorMarc André Tanner <mat@brain-dump.org>2016-01-12 22:38:45 +0100
committerMarc André Tanner <mat@brain-dump.org>2016-01-13 21:38:20 +0100
commit2c0d472e87625000c71626fc965e7d1060f4ac7d (patch)
tree01409e1c5b469f23eb5263899a5b5a4cb3233cf3 /map.h
parent0b886f820677aa949c9ce6f16378a73863e537dd (diff)
downloadvis-2c0d472e87625000c71626fc965e7d1060f4ac7d.tar.gz
vis-2c0d472e87625000c71626fc965e7d1060f4ac7d.tar.xz
map: implement map_copy
Copies all entries from one map to another, overwriting existing entries.
Diffstat (limited to 'map.h')
-rw-r--r--map.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/map.h b/map.h
index 078c9c6..0540fab 100644
--- a/map.h
+++ b/map.h
@@ -21,6 +21,8 @@ bool map_put(Map*, const char *key, const void *value);
/* Remove a member from the map. Returns the removed entry or NULL
* if there was no entry found using the given key*/
void *map_delete(Map*, const char *key);
+/* Copy all entries from `src' into `dest', overwrites existing entries in `dest' */
+bool map_copy(Map *dest, Map *src);
/* Ordered iteration over a map, call handle for every entry. If handle
* returns false, the iteration will stop. */
void map_iterate(const Map*, bool (*handle)(const char *key, void *value, void *data), const void *data);