altra64/inc/hashtable.h
Robin Jones b719c4389f improved the sound implementation
(still has too much latency, although mainly due to other parts of the menu)
2016-12-29 17:05:09 +00:00

20 lines
667 B
C

typedef struct hashtable hashtable;
void hashtable_destroy(hashtable *t);
typedef struct hashtable_entry hashtable_entry;
hashtable_entry *hashtable_body_allocate(unsigned int capacity);
hashtable *hashtable_create();
void hashtable_remove(hashtable *t,char *key);
void hashtable_resize(hashtable *t,unsigned int capacity);
void hashtable_set(hashtable *t,char *key,void *value);
void *hashtable_get(hashtable *t,char *key);
unsigned int hashtable_find_slot(hashtable *t,char *key);
unsigned long hashtable_hash(char *str);
struct hashtable {
unsigned int size;
unsigned int capacity;
hashtable_entry* body;
};
struct hashtable_entry {
char* key;
void* value;
};