diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-04 18:31:00 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-03-04 18:31:00 +0100 |
commit | 7bc58226a529293c42e82eba3b37eecf7f5978c7 (patch) | |
tree | 63a4db9de4870eb5cc00266ce85755e83966c1ab /trie.inc.h | |
parent | Change vendor attribute from HH to HNH. (diff) | |
download | calp-7bc58226a529293c42e82eba3b37eecf7f5978c7.tar.gz calp-7bc58226a529293c42e82eba3b37eecf7f5978c7.tar.xz |
set-attr! can now add new keys.
Diffstat (limited to '')
-rw-r--r-- | trie.inc.h | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -88,6 +88,8 @@ TYPE* GET(TRIE(TYPE)) ( TRIE(TYPE)* trie, char* key ) { while (n != NULL) { if (subkey[1] == '\0') { + /* Wanted node found, + * value can however be NULL */ return n->value; } else if (subkey[0] == n->c) { n = n->child; @@ -97,7 +99,7 @@ TYPE* GET(TRIE(TYPE)) ( TRIE(TYPE)* trie, char* key ) { } } - ERR("Position not found"); + /* Position not found */ return 0; } |