[tor-commits] [tor/master] Remove string hash in ht.h so we can't accidentally use it

nickm at torproject.org nickm at torproject.org
Sat Feb 15 21:04:28 UTC 2014


commit 1ad6dd0dbee7c757ef5f2f2d38b846ab7d991fb2
Author: Nick Mathewson <nickm at torproject.org>
Date:   Sat Feb 15 15:45:38 2014 -0500

    Remove string hash in ht.h so we can't accidentally use it
---
 src/ext/ht.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/ext/ht.h b/src/ext/ht.h
index 669a2ed..8bf9b80 100644
--- a/src/ext/ht.h
+++ b/src/ext/ht.h
@@ -86,6 +86,7 @@ ht_string_hash(const char *s)
 }
 #endif
 
+#if 0
 /** Basic string hash function, from Python's str.__hash__() */
 static INLINE unsigned
 ht_string_hash(const char *s)
@@ -100,6 +101,7 @@ ht_string_hash(const char *s)
   h ^= (unsigned)(cp-(const unsigned char*)s);
   return h;
 }
+#endif
 
 #ifndef HT_NO_CACHE_HASH_VALUES
 #define HT_SET_HASH_(elm, field, hashfn)        \





More information about the tor-commits mailing list