summaryrefslogtreecommitdiffhomepage
path: root/include/stc/coroutine.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/stc/coroutine.h')
-rw-r--r--include/stc/coroutine.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/stc/coroutine.h b/include/stc/coroutine.h
index 0e592bae..cecd4002 100644
--- a/include/stc/coroutine.h
+++ b/include/stc/coroutine.h
@@ -38,7 +38,7 @@ int iterpair(struct iterpair* I) {
for (I->y = 0; I->y < I->max_y; I->y++)
cco_yield();
- cco_cleanup: // required if there is cleanup code
+ cco_final: // required if there is cleanup code
puts("final");
}
return 0; // CCO_DONE
@@ -103,7 +103,8 @@ typedef enum {
/* cco_blocking_call(): assumes coroutine returns a cco_result value (int) */
#define cco_blocking_call(corocall) while ((corocall) != CCO_DONE)
-#define cco_cleanup \
+#define cco_cleanup cco_final // [deprecated]
+#define cco_final \
*_state = CCO_STATE_CLEANUP; case CCO_STATE_CLEANUP
#define cco_return \