haproxy/include/types/dict.h
Frédéric Lécaille 99de1d0479 MINOR: dict: Store the length of the dictionary entries.
When allocating new dictionary entries we store the length of the strings.
May be useful so that not to have to call strlen() too much often at runing
time.
2019-06-07 15:47:54 +02:00

19 lines
311 B
C

#ifndef _TYPES_DICT_H
#define _TYPES_DICT_H
#include <common/hathreads.h>
#include <ebpttree.h>
struct dict_entry {
struct ebpt_node value;
unsigned int refcount;
size_t len;
};
struct dict {
const char *name;
struct eb_root values;
__decl_hathreads(HA_RWLOCK_T rwlock);
};
#endif /* _TYPES_DICT_H */