Commit 52c48431 authored by Rusty Russell's avatar Rusty Russell

tdb2: remove tdb_hashfn_t prototype

It doesn't help the user, since they can't use it to declare their hash
function, and it just adds a level of mental indirection for us.
parent 02d83e6a
......@@ -338,7 +338,7 @@ struct tdb_context {
void *log_private;
/* Hash function. */
tdb_hashfn_t khash;
uint64_t (*khash)(const void *key, size_t len, uint64_t seed, void *);
void *hash_priv;
uint64_t hash_seed;
......
......@@ -78,8 +78,6 @@ struct tdb_context;
/* FIXME: Make typesafe */
typedef int (*tdb_traverse_func)(struct tdb_context *, TDB_DATA, TDB_DATA, void *);
typedef uint64_t (*tdb_hashfn_t)(const void *key, size_t len, uint64_t seed,
void *priv);
enum tdb_attribute_type {
TDB_ATTRIBUTE_LOG = 0,
......@@ -104,7 +102,8 @@ struct tdb_attribute_log {
struct tdb_attribute_hash {
struct tdb_attribute_base base; /* .attr = TDB_ATTRIBUTE_HASH */
tdb_hashfn_t hash_fn;
uint64_t (*hash_fn)(const void *key, size_t len, uint64_t seed,
void *priv);
void *hash_private;
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment