Add the ability to copy a ref trie.

This commit is contained in:
2018-05-11 14:40:01 -07:00
parent 92186911ad
commit 8f48a16a25
2 changed files with 64 additions and 9 deletions

View File

@@ -53,6 +53,14 @@ typedef struct libab_ref_trie_s libab_ref_trie;
* @param trie the trie to initialize.
*/
void libab_ref_trie_init(libab_ref_trie* trie);
/**
* Initializes a new trie with a shallow copy of another.
* @param trie the trie to initialize.
* @param copy_of the trie to copy.
* @return the result of the initialization.
*/
libab_result libab_ref_trie_init_copy(libab_ref_trie* trie,
const libab_ref_trie* copy_of);
/**
* Stores a reference counted value into the trie.
* This releases the reference for the given key, if one