summaryrefslogtreecommitdiff
path: root/examples/c/ex_async.c
diff options
context:
space:
mode:
authorSusan LoVerso <sue@wiredtiger.com>2014-04-09 14:25:51 -0400
committerSusan LoVerso <sue@wiredtiger.com>2014-04-09 14:25:51 -0400
commit569be29173e98a138235a4b3a1023efa081ccb5a (patch)
treedf59346cbc43190989e190146e20714faf06c84c /examples/c/ex_async.c
parent67321f50aff0f8971e1093a04c92080772b92be1 (diff)
downloadmongo-569be29173e98a138235a4b3a1023efa081ccb5a.tar.gz
Use an underlying cursor for async op keys/values.
Diffstat (limited to 'examples/c/ex_async.c')
-rw-r--r--examples/c/ex_async.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/examples/c/ex_async.c b/examples/c/ex_async.c
index b0e76b7fbdc..b9a4698646e 100644
--- a/examples/c/ex_async.c
+++ b/examples/c/ex_async.c
@@ -118,25 +118,19 @@ retry:
snprintf(k[i], sizeof(k), "key%d", i);
snprintf(v[i], sizeof(v), "value%d", i);
/*! [Set the op's string key] */
- key.data = k[i];
- key.size = sizeof(k[i]);
- value.data = v[i];
- value.size = sizeof(v[i]);
- op->set_key(op, &key);
+ op->set_key(op, k[i]);
/*! [Set the op's string key] */
/*! [Set the op's string value] */
- op->set_value(op, &value);
+ op->set_value(op, v[i]);
/*! [Set the op's string value] */
/*! [example insert] */
ret = op->insert(op);
/*! [example insert] */
}
- ret = wt_conn->async_new_op(wt_conn, uri, "raw", &cb, &opget);
+ ret = wt_conn->async_new_op(wt_conn, uri, NULL, &cb, &opget);
snprintf(k[0], sizeof(k[0]), "key1");
- key.data = k[0];
- key.size = sizeof(k[0]);
- opget->set_key(opget, &key);
+ opget->set_key(opget, k[0]);
search_id = opget->get_id(opget);
opget->search(opget);