]> git.ozlabs.org Git - ccan/blob - ccan/tdb2/test/logging.h
tdb2: delete and fetch now work.
[ccan] / ccan / tdb2 / test / logging.h
1 #ifndef TDB2_TEST_LOGGING_H
2 #define TDB2_TEST_LOGGING_H
3 #include <ccan/tdb2/tdb2.h>
4 #include <stdbool.h>
5 #include <string.h>
6
7 unsigned tap_log_messages;
8
9 void tap_log_fn(struct tdb_context *tdb,
10                 enum tdb_debug_level level, void *priv,
11                 const char *fmt, ...);
12
13 static inline bool data_equal(struct tdb_data a, struct tdb_data b)
14 {
15         if (a.dsize != b.dsize)
16                 return false;
17         return memcmp(a.dptr, b.dptr, a.dsize) == 0;
18 }
19 #endif /* TDB2_TEST_LOGGING_H */