Branch data Line data Source code
1 : : /* Note: only one hash table can be implemented a single file. */
2 : : #include "../symbols.h"
3 : : #include "hash/hash_table_def.h"
4 [ # # ]: 1560 : DEFINE_HASH_TABLE(fb_name_table)
5 : :
6 : : #include "hash/hash_table_impl.h"
7 : :
8 : : static inline int ht_match(const void *key, size_t len, fb_name_t *name)
9 : : {
10 [ + + ][ - + ]: 635 : return len == (size_t)name->name.s.len && memcmp(key, name->name.s.s, len) == 0;
[ # # ][ # # ]
[ + + ][ - + ]
11 : : }
12 : :
13 : : static inline const void *ht_key(fb_name_t *name)
14 : : {
15 : : return name->name.s.s;
16 : : }
17 : :
18 : : static inline size_t ht_key_len(fb_name_t *name)
19 : : {
20 : 583 : return name->name.s.len;
21 : : }
|