shithub: hmap

ref: d3298a0f73f8d45249df6b45b167ae17bea22167
dir: hmap/hash.h

View raw version
typedef struct Hnode Hnode;
struct Hnode {
	Hnode *next;
	int filled;
};

typedef struct Hmap Hmap;
struct Hmap {
	RWLock;
	uvlong (*hash)(Hnode*);
	int (*cmp)(Hnode*,Hnode*);
	int nodeverb;

	int size;
	usize nsize;

	uchar *nodes;
	int len;
	int cap;
};