hashtable

hash table macros for creating hash table functions, it supports any type key, value, hash
git clone https://noulin.net/git/hashtable.git
Log | Files | Refs | LICENSE

commit 375b9089a5290b48ffbbf770f6395a432462415f
parent eca9ede99475ed1d0cd554b4cbcdb7506fb9c833
Author: Remy Noulin <loader2x@gmail.com>
Date:   Mon, 21 Mar 2022 23:08:46 +0200

correct iteration example

hashtable.h | 5 ++++-
package.yml | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)

Diffstat:
Mhashtable.h | 5++++-
Mpackage.yml | 2+-
2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/hashtable.h b/hashtable.h @@ -108,8 +108,11 @@ * u32 result = 0; * hashTbGet(h, "a key", result); * - * for(hashTbIterStart(h); (name).res ; hashTbIterNext(h)) { + * // iteration on all elements + * hashTbIterStart(h) + * while (h.res) { * put(hashTbIterKey(h)); + * hashTbIterNext(h); * } * * hashTbDel(h, "a key"); diff --git a/package.yml b/package.yml @@ -1,6 +1,6 @@ --- name: hashtable - version: 0.0.19 + version: 0.0.20 description: "hash table macros for creating hash table functions, it supports any type key, value, hash" bin: ./hashtable.c cflags: "-O1 -std=gnu11 -fPIC -pipe"