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 [ # # ]: 298 : DEFINE_HASH_TABLE(fb_schema_table)
5 : :
6 : : #include "hash/hash_table_impl.h"
7 : :
8 : : static inline int ht_match(const void *key, size_t len, fb_schema_t *schema)
9 : : {
10 [ + + ][ - + ]: 64 : return len == (size_t)schema->name.name.s.len && memcmp(key, schema->name.name.s.s, len) == 0;
[ # # ][ # # ]
[ - + ][ # # ]
11 : : }
12 : :
13 : : static inline const void *ht_key(fb_schema_t *schema)
14 : : {
15 : : return schema->name.name.s.s;
16 : : }
17 : :
18 : : static inline size_t ht_key_len(fb_schema_t *schema)
19 : : {
20 : 99 : return schema->name.name.s.len;
21 : : }
|