diff options
Diffstat (limited to 'misc/examples')
| -rw-r--r-- | misc/examples/coroutines/cotasks1.c | 2 | ||||
| -rw-r--r-- | misc/examples/coroutines/cotasks2.c | 2 | ||||
| -rw-r--r-- | misc/examples/coroutines/filetask.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/misc/examples/coroutines/cotasks1.c b/misc/examples/coroutines/cotasks1.c index 7df4eb34..db9632e6 100644 --- a/misc/examples/coroutines/cotasks1.c +++ b/misc/examples/coroutines/cotasks1.c @@ -43,7 +43,7 @@ struct produce_items { int produce_items(struct produce_items* p) { cco_routine (p) { - p->str = cstr_null; + p->str = cstr_init(); while (true) { cco_await(next_value(&p->next) != CCO_AWAIT); diff --git a/misc/examples/coroutines/cotasks2.c b/misc/examples/coroutines/cotasks2.c index f6257a7e..12c2c4a3 100644 --- a/misc/examples/coroutines/cotasks2.c +++ b/misc/examples/coroutines/cotasks2.c @@ -41,7 +41,7 @@ cco_task_struct (produce_items, int produce_items(struct produce_items* p, cco_runtime* rt) { cco_routine (p) { - p->str = cstr_null; + p->str = cstr_init(); p->next.cco_func = next_value; while (true) { diff --git a/misc/examples/coroutines/filetask.c b/misc/examples/coroutines/filetask.c index 74388359..9650cb60 100644 --- a/misc/examples/coroutines/filetask.c +++ b/misc/examples/coroutines/filetask.c @@ -17,7 +17,7 @@ int file_read(struct file_read* co, cco_runtime* rt) { cco_routine (co) { co->fp = fopen(co->path, "r"); - co->line = cstr_null; + co->line = cstr_init(); while (true) { // emulate async io: await 10ms per line |
