diff options
| author | Tyge Løvset <[email protected]> | 2023-03-07 22:27:06 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-03-07 22:27:06 +0100 |
| commit | bdbfc5dcbddc52c8bea5dc1a99464b2de724157a (patch) | |
| tree | d2b7e207196c5e427f1b4dc1d4380a7448a41bd3 /include/stc | |
| parent | ecc0b2108cffeb725e3b8e2574b6fb7927dfd96e (diff) | |
| parent | 03ffb83851690e155a65606010052490f8e5a934 (diff) | |
| download | STC-modified-bdbfc5dcbddc52c8bea5dc1a99464b2de724157a.tar.gz STC-modified-bdbfc5dcbddc52c8bea5dc1a99464b2de724157a.zip | |
Merge branch 'master' of github.com:tylov/STC
Diffstat (limited to 'include/stc')
| -rw-r--r-- | include/stc/algo/coroutine.h | 6 |
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 \ |
