aboutsummaryrefslogtreecommitdiff
path: root/map.h
diff options
context:
space:
mode:
Diffstat (limited to 'map.h')
-rw-r--r--map.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/map.h b/map.h
index 3035ff4..c9690ad 100644
--- a/map.h
+++ b/map.h
@@ -17,6 +17,9 @@ void *map_closest(const Map*, const char *prefix);
/* check whether the map contains the given prefix, i.e. whether it can
* be extended to match a key of an element stored in the map. */
bool map_contains(const Map*, const char *prefix);
+/* Test whether the given prefix can be extended to exactly one map element
+ * i.e. true iff the prefix map contains exactly one element. */
+bool map_leaf(const Map*, const char *prefix);
/* Place a member in the map. This returns false if we run out of memory
* (errno = ENOMEM), or if that key already appears in the map (errno = EEXIST). */
bool map_put(Map*, const char *key, const void *value);