]> pd.if.org Git - nbds/blob - include/nstring.h
all structures now support arbitrary type keys with a fast path for integers
[nbds] / include / nstring.h
1 #ifndef NSTRING_H
2 #define NSTRING_H
3
4 typedef struct nstring {
5     uint32_t len;
6     char data[];
7 } nstring_t;
8
9 nstring_t * ns_alloc (uint32_t len);
10 int         ns_cmp   (const nstring_t *ns1, const nstring_t *ns2);
11 uint32_t    ns_hash  (const nstring_t *ns);
12 nstring_t * ns_dup   (const nstring_t *ns);
13
14 #endif//NSTRING_H