Arthur, thanks for the information. That almost worked but I had to make a modification to the comparison in HASH_FIND_IN_BKT. I don't actually know why there is a memcmp in there in the first place as if the hash and keylen match, isn't that enough?
A memcmp on a structure which contains pointers is never going to work.
Here is the patch and it works for me but obviously there might be a better way of doing this.
---
uthash.h.org 2018-07-05 09:29:02.124786760 +0100
+++ uthash.h 2018-07-05 09:26:49.339549754 +0100
@@ -833,9 +833,7 @@
} \
while ((out) != NULL) { \
if ((out)->hh.hashv == (hashval) && (out)->hh.keylen == (keylen_in)) { \
- if (uthash_memcmp((out)->hh.key, keyptr, keylen_in) == 0) { \
break; \
- } \
} \
if ((out)->hh.hh_next != NULL) { \
DECLTYPE_ASSIGN(out, ELMT_FROM_HH(tbl, (out)->hh.hh_next)); \
Jon.
--