summaryrefslogtreecommitdiffhomepage
path: root/misc
diff options
context:
space:
mode:
authortylov <[email protected]>2023-08-13 17:38:10 +0200
committertylov <[email protected]>2023-08-13 17:38:10 +0200
commit972aa23a674f743c187e82444c2271aaa3e9cd06 (patch)
treeb39b5e9e36c0251a06d40090a26c8e8da5a2167e /misc
parent1802558d41112e99d965000c97c45ebf7984d70c (diff)
downloadSTC-modified-972aa23a674f743c187e82444c2271aaa3e9cd06.tar.gz
STC-modified-972aa23a674f743c187e82444c2271aaa3e9cd06.zip
Removed csview_null - use csview_init().
Diffstat (limited to 'misc')
-rw-r--r--misc/examples/coroutines/cotasks1.c2
-rw-r--r--misc/examples/coroutines/cotasks2.c2
-rw-r--r--misc/examples/coroutines/filetask.c2
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