|
@@ -1,5 +1,5 @@
|
|
|
/*
|
|
/*
|
|
|
-Copyright (c) 2003-2021, Troy D. Hanson http://troydhanson.github.io/uthash/
|
|
|
|
|
|
|
+Copyright (c) 2003-2022, Troy D. Hanson https://troydhanson.github.io/uthash/
|
|
|
All rights reserved.
|
|
All rights reserved.
|
|
|
|
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
Redistribution and use in source and binary forms, with or without
|
|
@@ -51,6 +51,8 @@ typedef unsigned char uint8_t;
|
|
|
#else /* VS2008 or older (or VS2010 in C mode) */
|
|
#else /* VS2008 or older (or VS2010 in C mode) */
|
|
|
#define NO_DECLTYPE
|
|
#define NO_DECLTYPE
|
|
|
#endif
|
|
#endif
|
|
|
|
|
+#elif defined(__MCST__) /* Elbrus C Compiler */
|
|
|
|
|
+#define DECLTYPE(x) (__typeof(x))
|
|
|
#elif defined(__BORLANDC__) || defined(__ICCARM__) || defined(__LCC__) || defined(__WATCOMC__)
|
|
#elif defined(__BORLANDC__) || defined(__ICCARM__) || defined(__LCC__) || defined(__WATCOMC__)
|
|
|
#define NO_DECLTYPE
|
|
#define NO_DECLTYPE
|
|
|
#else /* GNU, Sun and other compilers */
|
|
#else /* GNU, Sun and other compilers */
|
|
@@ -450,7 +452,7 @@ do {
|
|
|
|
|
|
|
|
#define HASH_DELETE_HH(hh,head,delptrhh) \
|
|
#define HASH_DELETE_HH(hh,head,delptrhh) \
|
|
|
do { \
|
|
do { \
|
|
|
- struct UT_hash_handle *_hd_hh_del = (delptrhh); \
|
|
|
|
|
|
|
+ const struct UT_hash_handle *_hd_hh_del = (delptrhh); \
|
|
|
if ((_hd_hh_del->prev == NULL) && (_hd_hh_del->next == NULL)) { \
|
|
if ((_hd_hh_del->prev == NULL) && (_hd_hh_del->next == NULL)) { \
|
|
|
HASH_BLOOM_FREE((head)->hh.tbl); \
|
|
HASH_BLOOM_FREE((head)->hh.tbl); \
|
|
|
uthash_free((head)->hh.tbl->buckets, \
|
|
uthash_free((head)->hh.tbl->buckets, \
|
|
@@ -593,7 +595,9 @@ do {
|
|
|
|
|
|
|
|
|
|
|
|
|
/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at
|
|
/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at
|
|
|
- * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */
|
|
|
|
|
|
|
+ * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx
|
|
|
|
|
+ * (archive link: https://archive.is/Ivcan )
|
|
|
|
|
+ */
|
|
|
#define HASH_SAX(key,keylen,hashv) \
|
|
#define HASH_SAX(key,keylen,hashv) \
|
|
|
do { \
|
|
do { \
|
|
|
unsigned _sx_i; \
|
|
unsigned _sx_i; \
|