#include <string.h>
#include <stddef.h>
#include <stdlib.h>
#include <inttypes.h>
Classes | |
struct | UT_hash_bucket |
struct | UT_hash_table |
struct | UT_hash_handle |
Macros | |
#define | DECLTYPE(x) (__typeof(x)) |
#define | DECLTYPE_ASSIGN(dst, src) |
#define | UTHASH_VERSION 1.9.8 |
#define | uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */ |
#define | uthash_malloc(sz) malloc(sz) /* malloc fcn */ |
#define | uthash_free(ptr, sz) free(ptr) /* free fcn */ |
#define | uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */ |
#define | uthash_expand_fyi(tbl) /* can be defined to log expands */ |
#define | HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */ |
#define | HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */ |
#define | HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */ |
#define | ELMT_FROM_HH(tbl, hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho))) |
#define | HASH_FIND(hh, head, keyptr, keylen, out) |
#define | HASH_BLOOM_MAKE(tbl) |
#define | HASH_BLOOM_FREE(tbl) |
#define | HASH_BLOOM_ADD(tbl, hashv) |
#define | HASH_BLOOM_TEST(tbl, hashv) (1) |
#define | HASH_BLOOM_BYTELEN 0 |
#define | HASH_MAKE_TABLE(hh, head) |
#define | HASH_ADD(hh, head, fieldname, keylen_in, add) HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add) |
#define | HASH_REPLACE(hh, head, fieldname, keylen_in, add, replaced) |
#define | HASH_ADD_KEYPTR(hh, head, keyptr, keylen_in, add) |
#define | HASH_TO_BKT(hashv, num_bkts, bkt) |
#define | HASH_DELETE(hh, head, delptr) |
#define | HASH_FIND_STR(head, findstr, out) HASH_FIND(hh,head,findstr,strlen(findstr),out) |
#define | HASH_ADD_STR(head, strfield, add) HASH_ADD(hh,head,strfield,strlen(add->strfield),add) |
#define | HASH_REPLACE_STR(head, strfield, add, replaced) HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced) |
#define | HASH_FIND_INT(head, findint, out) HASH_FIND(hh,head,findint,sizeof(int),out) |
#define | HASH_ADD_INT(head, intfield, add) HASH_ADD(hh,head,intfield,sizeof(int),add) |
#define | HASH_REPLACE_INT(head, intfield, add, replaced) HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) |
#define | HASH_FIND_PTR(head, findptr, out) HASH_FIND(hh,head,findptr,sizeof(void *),out) |
#define | HASH_ADD_PTR(head, ptrfield, add) HASH_ADD(hh,head,ptrfield,sizeof(void *),add) |
#define | HASH_REPLACE_PTR(head, ptrfield, add) HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) |
#define | HASH_DEL(head, delptr) HASH_DELETE(hh,head,delptr) |
#define | HASH_FSCK(hh, head) |
#define | HASH_EMIT_KEY(hh, head, keyptr, fieldlen) |
#define | HASH_FCN HASH_JEN |
#define | HASH_BER(key, keylen, num_bkts, hashv, bkt) |
#define | HASH_SAX(key, keylen, num_bkts, hashv, bkt) |
#define | HASH_FNV(key, keylen, num_bkts, hashv, bkt) |
#define | HASH_OAT(key, keylen, num_bkts, hashv, bkt) |
#define | HASH_JEN_MIX(a, b, c) |
#define | HASH_JEN(key, keylen, num_bkts, hashv, bkt) |
#define | get16bits(d) |
#define | HASH_SFH(key, keylen, num_bkts, hashv, bkt) |
#define | HASH_KEYCMP(a, b, len) memcmp(a,b,len) |
#define | HASH_FIND_IN_BKT(tbl, hh, head, keyptr, keylen_in, out) |
#define | HASH_ADD_TO_BKT(head, addhh) |
#define | HASH_DEL_IN_BKT(hh, head, hh_del) |
#define | HASH_EXPAND_BUCKETS(tbl) |
#define | HASH_SORT(head, cmpfcn) HASH_SRT(hh,head,cmpfcn) |
#define | HASH_SRT(hh, head, cmpfcn) |
#define | HASH_SELECT(hh_dst, dst, hh_src, src, cond) |
#define | HASH_CLEAR(hh, head) |
#define | HASH_OVERHEAD(hh, head) |
#define | HASH_ITER(hh, head, el, tmp) |
#define | HASH_COUNT(head) HASH_CNT(hh,head) |
#define | HASH_CNT(hh, head) ((head)?((head)->hh.tbl->num_items):0) |
#define | HASH_SIGNATURE 0xa0111fe1 |
#define | HASH_BLOOM_SIGNATURE 0xb12220f2 |
#define DECLTYPE | ( | x) | (__typeof(x)) |
var DECLTYPE | ( | var) | (__typeof(x)) |
local DECLTYPE | ( | local) | (__typeof(x)) |
#define DECLTYPE_ASSIGN | ( | dst, | |
src | |||
) |
var DECLTYPE_ASSIGN | ( | var, | |
var | |||
) |
local DECLTYPE_ASSIGN | ( | local, | |
local | |||
) |
#define ELMT_FROM_HH | ( | tbl, | |
hhp | |||
) | ((void*)(((char*)(hhp)) - ((tbl)->hho))) |
var ELMT_FROM_HH | ( | var, | |
var | |||
) | ((void*)(((char*)(hhp)) - ((tbl)->hho))) |
local ELMT_FROM_HH | ( | local, | |
local | |||
) | ((void*)(((char*)(hhp)) - ((tbl)->hho))) |
#define get16bits | ( | d) |
var get16bits | ( | var) |
local get16bits | ( | local) |
#define HASH_ADD | ( | hh, | |
head, | |||
fieldname, | |||
keylen_in, | |||
add | |||
) | HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add) |
#define HASH_ADD_INT | ( | head, | |
intfield, | |||
add | |||
) | HASH_ADD(hh,head,intfield,sizeof(int),add) |
#define HASH_ADD_KEYPTR | ( | hh, | |
head, | |||
keyptr, | |||
keylen_in, | |||
add | |||
) |
#define HASH_ADD_PTR | ( | head, | |
ptrfield, | |||
add | |||
) | HASH_ADD(hh,head,ptrfield,sizeof(void *),add) |
var HASH_ADD_PTR | ( | var, | |
var, | |||
var | |||
) | HASH_ADD(hh,head,ptrfield,sizeof(void *),add) |
local HASH_ADD_PTR | ( | local, | |
local, | |||
local | |||
) | HASH_ADD(hh,head,ptrfield,sizeof(void *),add) |
#define HASH_ADD_STR | ( | head, | |
strfield, | |||
add | |||
) | HASH_ADD(hh,head,strfield,strlen(add->strfield),add) |
var HASH_ADD_STR | ( | var, | |
var, | |||
var | |||
) | HASH_ADD(hh,head,strfield,strlen(add->strfield),add) |
#define HASH_ADD_TO_BKT | ( | head, | |
addhh | |||
) |
var HASH_ADD_TO_BKT | ( | var, | |
var | |||
) |
local HASH_ADD_TO_BKT | ( | local, | |
local | |||
) |
#define HASH_BER | ( | key, | |
keylen, | |||
num_bkts, | |||
hashv, | |||
bkt | |||
) |
#define HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */ |
var HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */ |
local HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */ |
#define HASH_BLOOM_ADD | ( | tbl, | |
hashv | |||
) |
var HASH_BLOOM_ADD | ( | var, | |
var | |||
) |
local HASH_BLOOM_ADD | ( | local, | |
local | |||
) |
#define HASH_BLOOM_BYTELEN 0 |
var HASH_BLOOM_BYTELEN 0 |
local HASH_BLOOM_BYTELEN 0 |
#define HASH_BLOOM_FREE | ( | tbl) |
var HASH_BLOOM_FREE | ( | var) |
local HASH_BLOOM_FREE | ( | local) |
#define HASH_BLOOM_MAKE | ( | tbl) |
#define HASH_BLOOM_SIGNATURE 0xb12220f2 |
var HASH_BLOOM_SIGNATURE 0xb12220f2 |
local HASH_BLOOM_SIGNATURE 0xb12220f2 |
#define HASH_BLOOM_TEST | ( | tbl, | |
hashv | |||
) | (1) |
var HASH_BLOOM_TEST | ( | var, | |
var | |||
) | (1) |
local HASH_BLOOM_TEST | ( | local, | |
local | |||
) | (1) |
#define HASH_CLEAR | ( | hh, | |
head | |||
) |
#define HASH_CNT | ( | hh, | |
head | |||
) | ((head)?((head)->hh.tbl->num_items):0) |
var HASH_CNT | ( | var, | |
var | |||
) | ((head)?((head)->hh.tbl->num_items):0) |
local HASH_CNT | ( | local, | |
local | |||
) | ((head)?((head)->hh.tbl->num_items):0) |
#define HASH_COUNT | ( | head) | HASH_CNT(hh,head) |
var HASH_COUNT | ( | var) | HASH_CNT(hh,head) |
local HASH_COUNT | ( | local) | HASH_CNT(hh,head) |
#define HASH_DEL | ( | head, | |
delptr | |||
) | HASH_DELETE(hh,head,delptr) |
var HASH_DEL | ( | var, | |
var | |||
) | HASH_DELETE(hh,head,delptr) |
local HASH_DEL | ( | local, | |
local | |||
) | HASH_DELETE(hh,head,delptr) |
#define HASH_DEL_IN_BKT | ( | hh, | |
head, | |||
hh_del | |||
) |
#define HASH_DELETE | ( | hh, | |
head, | |||
delptr | |||
) |
#define HASH_EMIT_KEY | ( | hh, | |
head, | |||
keyptr, | |||
fieldlen | |||
) |
var HASH_EMIT_KEY | ( | var, | |
var, | |||
var, | |||
var | |||
) |
local HASH_EMIT_KEY | ( | local, | |
local, | |||
local, | |||
local | |||
) |
#define HASH_EXPAND_BUCKETS | ( | tbl) |
#define HASH_FCN HASH_JEN |
var HASH_FCN HASH_JEN |
local HASH_FCN HASH_JEN |
#define HASH_FIND | ( | hh, | |
head, | |||
keyptr, | |||
keylen, | |||
out | |||
) |
var HASH_FIND | ( | var, | |
var, | |||
var, | |||
var, | |||
var | |||
) |
local HASH_FIND | ( | local, | |
local, | |||
local, | |||
local, | |||
local | |||
) |
#define HASH_FIND_IN_BKT | ( | tbl, | |
hh, | |||
head, | |||
keyptr, | |||
keylen_in, | |||
out | |||
) |
#define HASH_FIND_INT | ( | head, | |
findint, | |||
out | |||
) | HASH_FIND(hh,head,findint,sizeof(int),out) |
var HASH_FIND_INT | ( | var, | |
var, | |||
var | |||
) | HASH_FIND(hh,head,findint,sizeof(int),out) |
local HASH_FIND_INT | ( | local, | |
local, | |||
local | |||
) | HASH_FIND(hh,head,findint,sizeof(int),out) |
#define HASH_FIND_PTR | ( | head, | |
findptr, | |||
out | |||
) | HASH_FIND(hh,head,findptr,sizeof(void *),out) |
var HASH_FIND_PTR | ( | var, | |
var, | |||
var | |||
) | HASH_FIND(hh,head,findptr,sizeof(void *),out) |
local HASH_FIND_PTR | ( | local, | |
local, | |||
local | |||
) | HASH_FIND(hh,head,findptr,sizeof(void *),out) |
#define HASH_FIND_STR | ( | head, | |
findstr, | |||
out | |||
) | HASH_FIND(hh,head,findstr,strlen(findstr),out) |
#define HASH_FNV | ( | key, | |
keylen, | |||
num_bkts, | |||
hashv, | |||
bkt | |||
) |
#define HASH_FSCK | ( | hh, | |
head | |||
) |
var HASH_FSCK | ( | var, | |
var | |||
) |
local HASH_FSCK | ( | local, | |
local | |||
) |
#define HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */ |
var HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */ |
local HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */ |
#define HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */ |
var HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */ |
local HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */ |
#define HASH_ITER | ( | hh, | |
head, | |||
el, | |||
tmp | |||
) |
var HASH_ITER | ( | var, | |
var, | |||
var, | |||
var | |||
) |
local HASH_ITER | ( | local, | |
local, | |||
local, | |||
local | |||
) |
#define HASH_JEN | ( | key, | |
keylen, | |||
num_bkts, | |||
hashv, | |||
bkt | |||
) |
#define HASH_JEN_MIX | ( | a, | |
b, | |||
c | |||
) |
#define HASH_KEYCMP | ( | a, | |
b, | |||
len | |||
) | memcmp(a,b,len) |
#define HASH_MAKE_TABLE | ( | hh, | |
head | |||
) |
#define HASH_OAT | ( | key, | |
keylen, | |||
num_bkts, | |||
hashv, | |||
bkt | |||
) |
#define HASH_OVERHEAD | ( | hh, | |
head | |||
) |
var HASH_OVERHEAD | ( | var, | |
var | |||
) |
local HASH_OVERHEAD | ( | local, | |
local | |||
) |
#define HASH_REPLACE | ( | hh, | |
head, | |||
fieldname, | |||
keylen_in, | |||
add, | |||
replaced | |||
) |
var HASH_REPLACE | ( | var, | |
var, | |||
var, | |||
var, | |||
var, | |||
var | |||
) |
local HASH_REPLACE | ( | local, | |
local, | |||
local, | |||
local, | |||
local, | |||
local | |||
) |
#define HASH_REPLACE_INT | ( | head, | |
intfield, | |||
add, | |||
replaced | |||
) | HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) |
var HASH_REPLACE_INT | ( | var, | |
var, | |||
var, | |||
var | |||
) | HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) |
local HASH_REPLACE_INT | ( | local, | |
local, | |||
local, | |||
local | |||
) | HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) |
#define HASH_REPLACE_PTR | ( | head, | |
ptrfield, | |||
add | |||
) | HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) |
var HASH_REPLACE_PTR | ( | var, | |
var, | |||
var | |||
) | HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) |
#define HASH_REPLACE_STR | ( | head, | |
strfield, | |||
add, | |||
replaced | |||
) | HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced) |
var HASH_REPLACE_STR | ( | var, | |
var, | |||
var, | |||
var | |||
) | HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced) |
local HASH_REPLACE_STR | ( | local, | |
local, | |||
local, | |||
local | |||
) | HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced) |
#define HASH_SAX | ( | key, | |
keylen, | |||
num_bkts, | |||
hashv, | |||
bkt | |||
) |
var HASH_SAX | ( | var, | |
var, | |||
var, | |||
var, | |||
var | |||
) |
local HASH_SAX | ( | local, | |
local, | |||
local, | |||
local, | |||
local | |||
) |
#define HASH_SELECT | ( | hh_dst, | |
dst, | |||
hh_src, | |||
src, | |||
cond | |||
) |
#define HASH_SFH | ( | key, | |
keylen, | |||
num_bkts, | |||
hashv, | |||
bkt | |||
) |
#define HASH_SIGNATURE 0xa0111fe1 |
var HASH_SIGNATURE 0xa0111fe1 |
local HASH_SIGNATURE 0xa0111fe1 |
#define HASH_SORT | ( | head, | |
cmpfcn | |||
) | HASH_SRT(hh,head,cmpfcn) |
#define HASH_SRT | ( | hh, | |
head, | |||
cmpfcn | |||
) |
#define HASH_TO_BKT | ( | hashv, | |
num_bkts, | |||
bkt | |||
) |
#define uthash_expand_fyi | ( | tbl) | /* can be defined to log expands */ |
#define uthash_fatal | ( | msg) | exit(-1) /* fatal error (out of memory,etc) */ |
var uthash_fatal | ( | var) | exit(-1) /* fatal error (out of memory,etc) */ |
local uthash_fatal | ( | local) | exit(-1) /* fatal error (out of memory,etc) */ |
#define uthash_free | ( | ptr, | |
sz | |||
) | free(ptr) /* free fcn */ |
var uthash_free | ( | var, | |
var | |||
) | free(ptr) /* free fcn */ |
local uthash_free | ( | local, | |
local | |||
) | free(ptr) /* free fcn */ |
#define uthash_malloc | ( | sz) | malloc(sz) /* malloc fcn */ |
var uthash_malloc | ( | var) | malloc(sz) /* malloc fcn */ |
local uthash_malloc | ( | local) | malloc(sz) /* malloc fcn */ |
#define uthash_noexpand_fyi | ( | tbl) | /* can be defined to log noexpand */ |
var uthash_noexpand_fyi | ( | var) | /* can be defined to log noexpand */ |
local uthash_noexpand_fyi | ( | local) | /* can be defined to log noexpand */ |
#define UTHASH_VERSION 1.9.8 |