diff options
Diffstat (limited to 'hash.h')
-rw-r--r-- | hash.h | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/hash.h b/hash.h deleted file mode 100644 index e1ff7385..00000000 --- a/hash.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef HASH_H -#define HASH_H - -#include <string.h> - -#include "macro.h" - -unsigned long hash(char*); - -#define HASHT(T) TEMPL(hash_t, T) - -#endif /* HASH_H */ -#ifdef TYPE - -typedef struct { - int size; - int item_count; - /* NOTE - * Hash maps are always assumed to hold pointers to objects - * Double pointer means a list of pointers. - */ - TYPE** values; -} TABLE(TYPE); - -int PUSH(HASHT(TYPE)) ( HASHT(TYPE)* table, TYPE* value ); - -INIT_F(HASHT(TYPE), int init_size ); - -TYPE* GET(HASHT(TYPE)) ( HASHT(TYPE)* table, char* key ); - -/* - * Free's all item's stored in table. - * And finally frees table. - */ -FREE_F(HASHT(TYPE)); - -#endif /* HASH_H */ |