~mcf/samurai

ref: ca5a6ba69fefe3fa23850e5730f41851abc56ec2 samurai/htab.h -rw-r--r-- 420 bytes
ca5a6ba6Michael Forney Add micro version number to --version output 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <stdint.h>  /* for uint64_t */

struct hashtablekey {
	uint64_t hash;
	const char *str;
	size_t len;
};

void htabkey(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 *);

uint64_t murmurhash64a(const void *, size_t);