summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorTyge Løvset <[email protected]>2023-03-07 22:27:06 +0100
committerTyge Løvset <[email protected]>2023-03-07 22:27:06 +0100
commitbdbfc5dcbddc52c8bea5dc1a99464b2de724157a (patch)
treed2b7e207196c5e427f1b4dc1d4380a7448a41bd3
parentecc0b2108cffeb725e3b8e2574b6fb7927dfd96e (diff)
parent03ffb83851690e155a65606010052490f8e5a934 (diff)
downloadSTC-modified-bdbfc5dcbddc52c8bea5dc1a99464b2de724157a.tar.gz
STC-modified-bdbfc5dcbddc52c8bea5dc1a99464b2de724157a.zip
Merge branch 'master' of github.com:tylov/STC
-rw-r--r--include/stc/algo/coroutine.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/stc/algo/coroutine.h b/include/stc/algo/coroutine.h
index 6d502988..59e4cfca 100644
--- a/include/stc/algo/coroutine.h
+++ b/include/stc/algo/coroutine.h
@@ -86,8 +86,10 @@ enum {
#define cco_yield_3(corocall, ctx, retval) \
do { \
*_state = __LINE__; \
- c_PASTE(cco, __LINE__): corocall; if (cco_alive(ctx)) return retval; \
- case __LINE__: if ((ctx)->cco_state >= cco_state_final) goto c_PASTE(cco, __LINE__); \
+ do { \
+ corocall; if (cco_alive(ctx)) return retval; \
+ case __LINE__:; \
+ } while ((ctx)->cco_state >= cco_state_final); \
} while (0)
#define cco_final \