瀏覽代碼

Remove string hash in ht.h so we can't accidentally use it

Nick Mathewson 10 年之前
父節點
當前提交
1ad6dd0dbe
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/ext/ht.h

+ 2 - 0
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)        \