summaryrefslogtreecommitdiffstats
path: root/trie.c
diff options
context:
space:
mode:
Diffstat (limited to 'trie.c')
-rw-r--r--trie.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/trie.c b/trie.c
index ff0e7be..c95dbfa 100644
--- a/trie.c
+++ b/trie.c
@@ -218,6 +218,10 @@ static struct trie_leaf *trie_representative(const struct trie *trie, const void
return trie_decode_leaf(ptr);
}
+struct trie_leaf *trie_first_leaf(const struct trie *trie) {
+ return trie_representative(trie, NULL, 0);
+}
+
struct trie_leaf *trie_find_str(const struct trie *trie, const char *key) {
return trie_find_mem(trie, key, strlen(key) + 1);
}