skipstone/examples/map.c

25 lines
532 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <skipstone/map.h>
int main(int argc, char **argv) {
skipstone_map *map;
if ((map = skipstone_map_new()) == NULL) {
perror("skipstone_map_new()");
return 1;
}
skipstone_map_set(map, 0xdead, (void *)0xdeadbeef);
skipstone_map_set(map, 0xbeef, (void *)0xcafebabe);
printf("%p\n", skipstone_map_get(map, 0xdead));
printf("%p\n", skipstone_map_get(map, 0xbeef));
skipstone_map_destroy(map, NULL);
return 0;
}