aboutsummaryrefslogtreecommitdiff
path: root/hash.h
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-01-20 23:01:04 +0100
committerHugo Hörnquist <hugo@hornquist.se>2019-01-20 23:01:04 +0100
commitbb76c6a4d74036c9de5e75134554ca04b0b9b5cb (patch)
tree809b8c9b1240be540c581a6e28ac0fcdb75c8dde /hash.h
parentSet SAFE_STR in makefile. (diff)
downloadcalp-bb76c6a4d74036c9de5e75134554ca04b0b9b5cb.tar.gz
calp-bb76c6a4d74036c9de5e75134554ca04b0b9b5cb.tar.xz
Fix some memmory errors.
And discovered some new ones.
Diffstat (limited to 'hash.h')
-rw-r--r--hash.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/hash.h b/hash.h
index 2a095cfd..cf955a95 100644
--- a/hash.h
+++ b/hash.h
@@ -18,7 +18,11 @@ unsigned long hash(char*);
typedef struct {
int size;
int item_count;
- TYPE* values;
+ /* NOTE
+ * Hash maps are always assumed to hold pointers to objects
+ * Double pointer means a list of pointers.
+ */
+ TYPE** values;
} TABLE(TYPE);
int HASH_PUT(TYPE) ( TABLE(TYPE)* table, TYPE* value );