diff options
author | David Robillard <d@drobilla.net> | 2014-09-23 03:25:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-09-23 03:25:22 +0000 |
commit | 28f948ed40c8340e906e8ba719ed91aa2bca4538 (patch) | |
tree | 60fab81cbe45c59eaa56091906537c38167b2546 /zix/hash.c | |
parent | c5971b8a7b960803440d894b68b4620e6996ae13 (diff) | |
download | zix-28f948ed40c8340e906e8ba719ed91aa2bca4538.tar.gz zix-28f948ed40c8340e906e8ba719ed91aa2bca4538.tar.bz2 zix-28f948ed40c8340e906e8ba719ed91aa2bca4538.zip |
Allow non-const visitation of hash nodes.
Update doc comments.
git-svn-id: http://svn.drobilla.net/zix/trunk@88 df6676b4-ccc9-40e5-b5d6-7c4628a128e3
Diffstat (limited to 'zix/hash.c')
-rw-r--r-- | zix/hash.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -46,8 +46,8 @@ struct ZixHashImpl { unsigned count; }; -static inline const void* -zix_hash_value(const ZixHashEntry* entry) +static inline void* +zix_hash_value(ZixHashEntry* entry) { return entry + 1; } @@ -219,13 +219,13 @@ zix_hash_remove(ZixHash* hash, const void* value) } ZIX_API void -zix_hash_foreach(const ZixHash* hash, +zix_hash_foreach(ZixHash* hash, ZixHashVisitFunc f, void* user_data) { for (unsigned b = 0; b < *hash->n_buckets; ++b) { ZixHashEntry* bucket = hash->buckets[b]; - for (const ZixHashEntry* e = bucket; e; e = e->next) { + for (ZixHashEntry* e = bucket; e; e = e->next) { f(zix_hash_value(e), user_data); } } |