diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-01-20 23:01:04 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-01-20 23:01:04 +0100 |
commit | bb76c6a4d74036c9de5e75134554ca04b0b9b5cb (patch) | |
tree | 809b8c9b1240be540c581a6e28ac0fcdb75c8dde /hash.h | |
parent | Set SAFE_STR in makefile. (diff) | |
download | calp-bb76c6a4d74036c9de5e75134554ca04b0b9b5cb.tar.gz calp-bb76c6a4d74036c9de5e75134554ca04b0b9b5cb.tar.xz |
Fix some memmory errors.
And discovered some new ones.
Diffstat (limited to '')
-rw-r--r-- | hash.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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 ); |