]> git.ozlabs.org Git - ccan/blobdiff - ccan/tdb2/private.h
tdb2: rearrange log function to put data arg at the end.
[ccan] / ccan / tdb2 / private.h
index c95c7e05e59181f9d67c8131c7d813353a4c99af..a569b1db3667b05e27e6aaf27fdf0afd02182898 100644 (file)
@@ -89,7 +89,7 @@ typedef int tdb_bool_err;
 /* Expanding file. */
 #define TDB_EXPANSION_LOCK 2
 /* Hash chain locks. */
-#define TDB_HASH_LOCK_START 3
+#define TDB_HASH_LOCK_START 64
 
 /* Range for hash locks. */
 #define TDB_HASH_LOCK_RANGE_BITS 30
@@ -365,15 +365,15 @@ struct tdb_context {
        uint32_t flags;
 
        /* Logging function */
-       void (*logfn)(struct tdb_context *tdb,
-                     enum tdb_log_level level,
-                     void *log_private,
-                     const char *message);
-       void *log_private;
+       void (*log_fn)(struct tdb_context *tdb,
+                      enum tdb_log_level level,
+                      const char *message,
+                      void *data);
+       void *log_data;
 
        /* Hash function. */
-       uint64_t (*khash)(const void *key, size_t len, uint64_t seed, void *);
-       void *hash_priv;
+       uint64_t (*hash_fn)(const void *key, size_t len, uint64_t seed, void *);
+       void *hash_data;
        uint64_t hash_seed;
 
        /* Set if we are in a transaction. */