bigkv_search.c (298B)
1 /* ISC license. */ 2 3 #include <skalibs/genalloc.h> 4 #include <skalibs/avltree.h> 5 #include <skalibs/bigkv.h> 6 7 char const *bigkv_search (bigkv const *b, char const *k) 8 { 9 uint32_t i ; 10 if (!avltree_search(&b->map, k, &i)) return 0 ; 11 return b->storage.s + genalloc_s(bigkv_node, &b->nodes)[i].v ; 12 }