diff --git a/CHANGELOG.md b/CHANGELOG.md index be42985..06cdd2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## main +* fix build with uthash \< 2.3.0 [bgilbert] + +## 1.1.0, 28/3/24 + * deprecate `dcm_init()` [bgilbert] * improve memory usage [bgilbert] * fix docs build with LLVM != 14 [bgilbert] diff --git a/src/dicom-dict-build.c b/src/dicom-dict-build.c index f39547b..265a883 100644 --- a/src/dicom-dict-build.c +++ b/src/dicom-dict-build.c @@ -43,7 +43,7 @@ static void make_table(const char *name, const void *items, int count, } int this_key_len = key_len ? key_len : (int) strlen(KEY(i)); unsigned hash; - HASH_FUNCTION(KEY(i), this_key_len, hash); + HASH_VALUE(KEY(i), this_key_len, hash); int cell, probe; for (probe = 0, cell = hash % table_len; probe < MAX_PROBES && table[cell] != EMPTY; diff --git a/src/dicom-dict.c b/src/dicom-dict.c index 27f5f83..2297b5b 100644 --- a/src/dicom-dict.c +++ b/src/dicom-dict.c @@ -26,7 +26,7 @@ #define LOOKUP(table, field, hash, key, key_len, out) do { \ unsigned hash_value; \ - HASH_FUNCTION(key, key_len, hash_value); \ + HASH_VALUE(key, key_len, hash_value); \ for (int probe = 0; true; probe++) { \ int i = hash ## _dict[(hash_value + probe) % hash ## _len]; \ if (i == hash ## _empty || probe == LOOKUP_MAX_PROBES) { \