tdb2: unify tdb1_traverse into tdb_traverse
[ccan] / ccan / tdb2 / test / run-tdb1-traverse-in-transaction.c
index 27df05ebb32310abbaeaf9a8eca1545c0c044bab..c4fd89dfe4b79b44996063d5dfb6b7d7ec794fcc 100644 (file)
@@ -57,19 +57,19 @@ int main(int argc, char *argv[])
        data.dptr = (void *)"world";
        data.dsize = strlen("world");
 
-       ok1(tdb1_store(tdb, key, data, TDB_INSERT) == 0);
+       ok1(tdb_store(tdb, key, data, TDB_INSERT) == TDB_SUCCESS);
 
        ok1(external_agent_operation1(agent, OPEN, tdb->name) == SUCCESS);
 
        ok1(tdb1_transaction_start(tdb) == 0);
        ok1(external_agent_operation1(agent, TRANSACTION_START, tdb->name)
            == WOULD_HAVE_BLOCKED);
-       tdb1_traverse(tdb, traverse, NULL);
+       tdb_traverse(tdb, traverse, NULL);
 
        /* That should *not* release the transaction lock! */
        ok1(external_agent_operation1(agent, TRANSACTION_START, tdb->name)
            == WOULD_HAVE_BLOCKED);
-       tdb1_traverse_read(tdb, traverse, NULL);
+       tdb_traverse(tdb, traverse, NULL);
 
        /* That should *not* release the transaction lock! */
        ok1(external_agent_operation1(agent, TRANSACTION_START, tdb->name)