]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/hash.c
tdb2: tdb_set_attribute, tdb_unset_attribute and tdb_get_attribute
[ccan] / ccan / tdb2 / hash.c
index c0b34f8a42ab576da4981cbf6b224c69f541bc35..745f04c87e5574f50719b3018b4a78f7167fbbd6 100644 (file)
 */
 #include "private.h"
 #include <assert.h>
-#include <ccan/hash/hash.h>
-
-static uint64_t jenkins_hash(const void *key, size_t length, uint64_t seed,
-                            void *arg)
-{
-       uint64_t ret;
-       /* hash64_stable assumes lower bits are more important; they are a
-        * slightly better hash.  We use the upper bits first, so swap them. */
-       ret = hash64_stable((const unsigned char *)key, length, seed);
-       return (ret >> 32) | (ret << 32);
-}
-
-void tdb_hash_init(struct tdb_context *tdb)
-{
-       tdb->hash_fn = jenkins_hash;
-}
 
 uint64_t tdb_hash(struct tdb_context *tdb, const void *ptr, size_t len)
 {