diff options
Diffstat (limited to 'lib/tdb_compat/tdb_compat.h')
-rw-r--r-- | lib/tdb_compat/tdb_compat.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/tdb_compat/tdb_compat.h b/lib/tdb_compat/tdb_compat.h index 80fc3cef80..16d1f48c7d 100644 --- a/lib/tdb_compat/tdb_compat.h +++ b/lib/tdb_compat/tdb_compat.h @@ -62,8 +62,13 @@ static inline TDB_DATA tdb_nextkey_compat(struct tdb_context *tdb, TDB_DATA k) return k; } -/* tdb_traverse_read and tdb_traverse are equal: both only take read locks. */ -#define tdb_traverse_read tdb_traverse +#define tdb_traverse_read(tdb, fn, p) \ + tdb_traverse_read_(tdb, typesafe_cb_preargs(int, void *, (fn), (p), \ + struct tdb_context *, \ + TDB_DATA, TDB_DATA), (p)) +int64_t tdb_traverse_read_(struct tdb_context *tdb, + int (*fn)(struct tdb_context *, + TDB_DATA, TDB_DATA, void *), void *p); /* Old-style tdb_errorstr */ #define tdb_errorstr_compat(tdb) tdb_errorstr(tdb_error(tdb)) |