aboutsummaryrefslogtreecommitdiff
path: root/htab.h
blob: eb0b6636f18457b1c5ca88209f54f679fc374eab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
struct hashtablekey {
	uint64_t hash;
	const char *str;
	size_t len;
};

void htabstrkey(struct hashtablekey *, const char *);
void htabbufkey(struct hashtablekey *, const char *, size_t);

struct hashtable *mkhtab(size_t);
void delhtab(struct hashtable *, void(void *));
void **htabput(struct hashtable *, struct hashtablekey *);
void *htabget(struct hashtable *, struct hashtablekey *);