diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-04 11:25:37 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2019-02-05 18:06:13 +0100 |
commit | dc8474d9034d9281463bb69f7f7a922e3ea713ee (patch) | |
tree | c3b870ada88f7aaa48918c4eb8b5d865f2f82019 /hash.inc.h | |
parent | Work on propper memmory management for linked lists. (diff) | |
download | calp-dc8474d9034d9281463bb69f7f7a922e3ea713ee.tar.gz calp-dc8474d9034d9281463bb69f7f7a922e3ea713ee.tar.xz |
Normalize and improve INIT & FREE macros.
Diffstat (limited to 'hash.inc.h')
-rw-r--r-- | hash.inc.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -17,7 +17,7 @@ int HASH_PUT(TYPE) ( TABLE(TYPE)* table, TYPE* value) { return 0; } -int HASH_INIT(TYPE) ( TABLE(TYPE)* table, int init_size ) { +INIT_F(HASH(TYPE), int init_size ) { /* * TODO parts of table might not get properly initialized to 0 */ @@ -43,7 +43,7 @@ TYPE* HASH_GET(TYPE) ( TABLE(TYPE)* table, char* key ) { } } -int HASH_FREE(TYPE) ( TABLE(TYPE)* table ) { +FREE(HASH(TYPE)) { /* * TODO an early return is possible by checking if all items have * been found. table->item_count |