summaryrefslogtreecommitdiffstats
path: root/test-ohash.c
blob: 84d1b6772102aa0be0e7aef3b8cae878d7ed333a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdint.h>
#include <stddef.h>
#include <stdlib.h>
#include <ohash.h>

void *xalloc(size_t sz, void *arg) { return(calloc(sz,1)); }
void xfree(void *p, size_t sz, void *arg) { free(p); }

int
main(void)
{
	struct ohash h;
	struct ohash_info i;
	i.halloc = i.alloc = xalloc;
	i.hfree = xfree;
	ohash_init(&h, 2, &i);
	ohash_delete(&h);
	return 0;
}