Bladeren bron

Rename uthash_memcmp to HASH_KEYCMP, step 3.

This completes the removal of uthash_memcmp,
and the "feature parity" of HASH_KEYCMP with HASH_FUNCTION.

The mental model, again, is: We default to hashing bytes with HASH_JEN,
and we default to comparing bytes with `memcmp` out of <string.h>.
But the user-programmer can override either or both of these defaults
by compiling with `-DHASH_FUNCTION=...` and/or `-DHASH_KEYCMP=...`.
Arthur O'Dwyer 4 jaren geleden
bovenliggende
commit
388134a0d4
1 gewijzigde bestanden met toevoegingen van 1 en 8 verwijderingen
  1. 1 8
      src/uthash.h

+ 1 - 8
src/uthash.h

@@ -85,19 +85,12 @@ do {
 #define uthash_strlen(s) strlen(s)
 #endif
 
-#ifdef uthash_memcmp
-/* This warning will not catch programs that define uthash_memcmp AFTER including uthash.h. */
-#warning "uthash_memcmp is deprecated; please use HASH_KEYCMP instead"
-#else
-#define uthash_memcmp(a,b,n) memcmp(a,b,n)
-#endif
-
 #ifndef HASH_FUNCTION
 #define HASH_FUNCTION(keyptr,keylen,hashv) HASH_JEN(keyptr, keylen, hashv)
 #endif
 
 #ifndef HASH_KEYCMP
-#define HASH_KEYCMP(a,b,n) uthash_memcmp(a,b,n)
+#define HASH_KEYCMP(a,b,n) memcmp(a,b,n)
 #endif
 
 #ifndef uthash_noexpand_fyi