From b03148caa1d6fc660e6e7c5986dd6fd38779bedc Mon Sep 17 00:00:00 2001 From: Tyge Løvset Date: Thu, 4 May 2023 11:51:56 +0200 Subject: Updates in coroutines.h: No longer *required* with cco_final:, but only when no cleanup is needed. --- misc/examples/coread.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'misc/examples/coread.c') diff --git a/misc/examples/coread.c b/misc/examples/coread.c index 38447c44..0073191b 100644 --- a/misc/examples/coread.c +++ b/misc/examples/coread.c @@ -20,10 +20,10 @@ bool file_read(struct file_read* g) while (cstr_getline(&g->line, g->fp)) cco_yield(false); - cco_final: // this label is required. - printf("finish\n"); - cstr_drop(&g->line); - fclose(g->fp); + cco_final: + printf("finish\n"); + cstr_drop(&g->line); + fclose(g->fp); cco_end(true); } -- cgit v1.2.3