summaryrefslogtreecommitdiffstats
path: root/src/trie.h
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-08-31 10:16:35 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-08-31 10:16:35 -0400
commit345047be5b8766a9763d4a717ff034e4e4083ade (patch)
treed1865a39269919087ace15184643907a56d62090 /src/trie.h
parent5f736eada55f84c7499103faf7c181b80eb7092f (diff)
downloadbfs-345047be5b8766a9763d4a717ff034e4e4083ade.tar.xz
trie: New trie_clear() function
Diffstat (limited to 'src/trie.h')
-rw-r--r--src/trie.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/trie.h b/src/trie.h
index 6921f62..dfaae15 100644
--- a/src/trie.h
+++ b/src/trie.h
@@ -129,6 +129,11 @@ struct trie_leaf *trie_insert_mem(struct trie *trie, const void *key, size_t len
void trie_remove(struct trie *trie, struct trie_leaf *leaf);
/**
+ * Remove all leaves from a trie.
+ */
+void trie_clear(struct trie *trie);
+
+/**
* Destroy a trie and its contents.
*/
void trie_destroy(struct trie *trie);