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 3f7bfc7e6684f5fc2563f96e6ba19a4b43dd016c
parent 93c0140bca82ccbc02e6740b42ad557bc804a8fa
Author: Remy Noulin <loader2x@gmail.com>
Date:   Sun, 20 Mar 2022 15:23:21 +0200

fix bug in addOrFindNode function: the hash value is now stored the new nodes

hashtable.h | 1 +
package.yml | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)

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

diff --git a/hashtable.h b/hashtable.h @@ -1033,6 +1033,7 @@ u32 ilog2Hashtable(u32 value); (name).newNodeInDArray = false;\ }\ nodePointer->key = k;\ + nodePointer->hash = UNIQVAR(hash);\ if (UNIQVAR(prev)) UNIQVAR(prev)->next = nodePointer;\ else (*(name).list)[UNIQVAR(mhash)][UNIQVAR(moreOrLess)] = nodePointer;\ nodePointer->next = UNIQVAR(node);\ diff --git a/package.yml b/package.yml @@ -1,6 +1,6 @@ --- name: hashtable - version: 0.0.17 + version: 0.0.18 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"