summaryrefslogtreecommitdiffhomepage
path: root/misc/examples
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-02-28 08:52:37 +0100
committerTyge Løvset <[email protected]>2023-02-28 08:52:37 +0100
commitd3c93c2cbb9ffe83a162d32b1021eb24ec703a9c (patch)
tree183ec4c49c6fc3c2215f7a5e8de31393e4b37a43 /misc/examples
parent0fb86f00db4f1d3600ec1b91d0a4e2ef8f778164 (diff)
downloadSTC-modified-d3c93c2cbb9ffe83a162d32b1021eb24ec703a9c.tar.gz
STC-modified-d3c93c2cbb9ffe83a162d32b1021eb24ec703a9c.zip
Renamed cco_coroutine => overloaded cco_yield(coro, ctx, retval).
Diffstat (limited to 'misc/examples')
-rw-r--r--misc/examples/coroutines.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/coroutines.c b/misc/examples/coroutines.c
index 867d02a8..577ef8c1 100644
--- a/misc/examples/coroutines.c
+++ b/misc/examples/coroutines.c
@@ -77,12 +77,12 @@ struct combine {
bool combine(struct combine* C) {
cco_begin(C);
- cco_coroutine(prime(&C->prm), &C->prm, true);
- cco_coroutine(fibonacci(&C->fib), &C->fib, true);
+ cco_yield(prime(&C->prm), &C->prm, true);
+ cco_yield(fibonacci(&C->fib), &C->fib, true);
// Reuse the C->prm context and extend the count:
C->prm.count = 20;
- cco_coroutine(prime(&C->prm), &C->prm, true);
+ cco_yield(prime(&C->prm), &C->prm, true);
cco_final: puts("final");
cco_end(false);