#ifndef HASHTBL_H #define HASHTBL_H typedef struct hash_table *hashtbl_t; struct hash_table { struct hash_item { struct hash_item *next; char *key; void *data; } **items; size_t cap; }; hashtbl_t hashtbl_create(size_t cap); void hashtbl_destroy(hashtbl_t hashtbl); void hashtbl_reset(hashtbl_t hashtbl); int hashtbl_insert(hashtbl_t hashtbl, char *key, void *data, size_t data_sz); int hashtbl_query(hashtbl_t hashtbl, char *key, void **dest); #endif