From 02f5b8fef868b7f77f1ac385740328757bff4d93 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 14 Sep 2011 07:51:13 +0930 Subject: tdb2: unify tdb1_fetch into tdb_fetch Switch on the TDB_VERSION1 flag. Signed-off-by: Rusty Russell (Imported from CCAN commit 08c05da588018c6b76834e57b66d525546643708) --- lib/tdb2/test/run-tdb1-nested-transactions.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/tdb2/test/run-tdb1-nested-transactions.c') diff --git a/lib/tdb2/test/run-tdb1-nested-transactions.c b/lib/tdb2/test/run-tdb1-nested-transactions.c index 6a10b46b1b..89e47d3fbf 100644 --- a/lib/tdb2/test/run-tdb1-nested-transactions.c +++ b/lib/tdb2/test/run-tdb1-nested-transactions.c @@ -15,7 +15,7 @@ int main(int argc, char *argv[]) hsize.base.next = &tap_log_attr; hsize.tdb1_hashsize.hsize = 1024; - plan_tests(27); + plan_tests(30); key.dsize = strlen("hi"); key.dptr = (void *)"hi"; @@ -28,19 +28,19 @@ int main(int argc, char *argv[]) data.dptr = (void *)"world"; data.dsize = strlen("world"); ok1(tdb_store(tdb, key, data, TDB_INSERT) == TDB_SUCCESS); - data = tdb1_fetch(tdb, key); + ok1(tdb_fetch(tdb, key, &data) == TDB_SUCCESS); ok1(data.dsize == strlen("world")); ok1(memcmp(data.dptr, "world", strlen("world")) == 0); free(data.dptr); ok1(tdb1_transaction_start(tdb) != 0); ok1(tdb_error(tdb) == TDB_ERR_EINVAL); - data = tdb1_fetch(tdb, key); + ok1(tdb_fetch(tdb, key, &data) == TDB_SUCCESS); ok1(data.dsize == strlen("world")); ok1(memcmp(data.dptr, "world", strlen("world")) == 0); free(data.dptr); ok1(tdb1_transaction_commit(tdb) == 0); - data = tdb1_fetch(tdb, key); + ok1(tdb_fetch(tdb, key, &data) == TDB_SUCCESS); ok1(data.dsize == strlen("world")); ok1(memcmp(data.dptr, "world", strlen("world")) == 0); free(data.dptr); -- cgit