]> thyrsus.com Git - comparator.git/commitdiff
CUSTOM_HASH becomes INTEGRAL_HASH.
authorEric S. Raymond <esr@thyrsus.com>
Mon, 15 Sep 2003 10:26:57 +0000 (10:26 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Mon, 15 Sep 2003 10:26:57 +0000 (10:26 +0000)
hash.c
hash.h

diff --git a/hash.c b/hash.c
index 03f825a1b36134f9596145bdb134c3424bd4237c..674eac41e9e7e0156a96aa4f5496ef6b8846664d 100644 (file)
--- a/hash.c
+++ b/hash.c
@@ -1,7 +1,7 @@
 /* hash.c -- hash and digest computation for comparator */
 #include "hash.h"
 
-#ifdef CUSTOM_HASH
+#ifdef INTEGRAL_HASH
 /******************************************************************************
 
 According to the Birthday Theorem, successive random choices from a
diff --git a/hash.h b/hash.h
index 1b9303c3e07bf1905e70ddd9389302427dc8f545..f20a6a722da964cc16e769468b6c8a55fe6e521b 100644 (file)
--- a/hash.h
+++ b/hash.h
@@ -1,13 +1,13 @@
 /* interface file for comparator hash function */
 
-#ifdef CUSTOM_HASH
+#ifdef INTEGRAL_HASH
 typedef unsigned long long     hashval_t;
-#define hash_compare(s, t)     ((s) - (t))
 #else
 typedef unsigned char  hashval_t[16];
-#define hash_compare(s, t)     memcmp((s), (t), sizeof(hashval_t))
 #endif
 
+#define hash_compare(s, t)     memcmp(&(s), &(t), sizeof(hashval_t))
+
 void hash_init(void);
 void hash_update(unsigned char *buffer, const int len);
 void hash_complete(hashval_t *hp);