diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-03-08 10:06:15 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-03-08 10:06:15 +0100 |
commit | 161163fdaf2b58cf725457112e5ea79b1dba0fee (patch) | |
tree | 6a17d7164d4339a03e2103835f6b8c8d3a281eac /hash.h | |
parent | Remove C vector library. (diff) | |
download | calp-161163fdaf2b58cf725457112e5ea79b1dba0fee.tar.gz calp-161163fdaf2b58cf725457112e5ea79b1dba0fee.tar.xz |
Remove C hash library.
Diffstat (limited to '')
-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 */ |