fix: make tests work with new trie
This commit is contained in:
parent
0c742f45b0
commit
d7d4821b66
4 changed files with 71 additions and 55 deletions
|
|
@ -81,6 +81,18 @@ TrieExitCode trie_search(Trie *trie, void **data_ptr, const char *key);
|
|||
TrieExitCode trie_add(Trie *trie, const char *key, void *data,
|
||||
uint64_t data_len);
|
||||
|
||||
/**
|
||||
* Same as trie_add, but copy the data instead of taking over ownership of the
|
||||
* pointer.
|
||||
*
|
||||
* @param trie
|
||||
* @param key key to represent entry with
|
||||
* @param entry entry to add
|
||||
* @return 0 if added, 1 if already in trie, something else if other errors
|
||||
*/
|
||||
TrieExitCode trie_add_copy(Trie *trie, const char *key, void *data,
|
||||
uint64_t data_len);
|
||||
|
||||
/**
|
||||
* Add an entry by generating a random string as the key.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue