muratsivas76 / hashset.c-1

hash set C implementation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

hashset.c

The hash set implementation in C.

Example

#include "hashset.h"

char *foo = "foo";
char *missing = "missing";
hashset_t set = hashset_create();

if (set == NULL) {
	fprintf(stderr, "failed to create hashset instance\n");
	abort();
}

hashset_add(set, foo);
assert(hashset_is_member(set, foo) == 1);
assert(hashset_is_member(set, missing) == 0);

About

hash set C implementation

License:Apache License 2.0


Languages

Language:C 95.7%Language:Makefile 4.3%