Skip to content

Commit f9abe8f

Browse files
authored
Merge pull request #85 from bgilbert/uthash
Call uthash `HASH_VALUE()` instead of `HASH_FUNCTION()`
2 parents 60f291d + bedc718 commit f9abe8f

3 files changed

Lines changed: 6 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
## main
22

3+
* fix build with uthash \< 2.3.0 [bgilbert]
4+
5+
## 1.1.0, 28/3/24
6+
37
* deprecate `dcm_init()` [bgilbert]
48
* improve memory usage [bgilbert]
59
* fix docs build with LLVM != 14 [bgilbert]

src/dicom-dict-build.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ static void make_table(const char *name, const void *items, int count,
4343
}
4444
int this_key_len = key_len ? key_len : (int) strlen(KEY(i));
4545
unsigned hash;
46-
HASH_FUNCTION(KEY(i), this_key_len, hash);
46+
HASH_VALUE(KEY(i), this_key_len, hash);
4747
int cell, probe;
4848
for (probe = 0, cell = hash % table_len;
4949
probe < MAX_PROBES && table[cell] != EMPTY;

src/dicom-dict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
#define LOOKUP(table, field, hash, key, key_len, out) do { \
2828
unsigned hash_value; \
29-
HASH_FUNCTION(key, key_len, hash_value); \
29+
HASH_VALUE(key, key_len, hash_value); \
3030
for (int probe = 0; true; probe++) { \
3131
int i = hash ## _dict[(hash_value + probe) % hash ## _len]; \
3232
if (i == hash ## _empty || probe == LOOKUP_MAX_PROBES) { \

0 commit comments

Comments
 (0)