From 345047be5b8766a9763d4a717ff034e4e4083ade Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 31 Aug 2023 10:16:35 -0400 Subject: trie: New trie_clear() function --- src/trie.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/trie.h') diff --git a/src/trie.h b/src/trie.h index 6921f62..dfaae15 100644 --- a/src/trie.h +++ b/src/trie.h @@ -128,6 +128,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. */ -- cgit v1.2.3