commit 2e3673c176dac608d8c69787e34a27cb1046a638
parent 063c238fa3de548086db271626d0c41fcc3bec63
Author: Remy Noulin <loader2x@gmail.com>
Date: Mon, 29 Jul 2019 16:03:49 +0200
fix bug due to variable name collisions in range, use rangeM instead
hashtable.h | 4 ++--
package.yml | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hashtable.h b/hashtable.h
@@ -526,8 +526,8 @@ u32 ilog2Hashtable(u32 value);
typeof((name).node) *(*UNIQVAR(list))[][2] = malloc(UNIQVAR(new_size) * 2 * sizeof(typeof((name).node)*));\
if (!UNIQVAR(list)) {(name).res = false; break;}\
memset(UNIQVAR(list), 0, UNIQVAR(new_size) * 2 * sizeof(typeof((name).node)*));\
- range(UNIQVAR(i), (name).size) {\
- range(UNIQVAR(moreLessIdx), 2) {\
+ rangeM(UNIQVAR(i), (name).size) {\
+ rangeM(UNIQVAR(moreLessIdx), 2) {\
for (typeof((name).node) *UNIQVAR(node) = (*(name).list)[UNIQVAR(i)][UNIQVAR(moreLessIdx)]; UNIQVAR(node);) {\
typeof((name).node) *UNIQVAR(next) = UNIQVAR(node)->next;\
u32 UNIQVAR(mhash) = UNIQVAR(node)->hash & (name).szMask;\
diff --git a/package.yml b/package.yml
@@ -1,6 +1,6 @@
---
name: hashtable
- version: 0.0.14
+ version: 0.0.15
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"