diff options
| author | Tyge Løvset <[email protected]> | 2023-03-12 22:06:56 +0100 |
|---|---|---|
| committer | Tyge Løvset <[email protected]> | 2023-03-12 22:06:56 +0100 |
| commit | fddae5ef07fc0e9a018e56a9843e059a737e4db7 (patch) | |
| tree | 252ac38301829ee05a011ee856e4c1da05714967 /include/stc | |
| parent | 9c4bfa7a3f0afe0f9f293fb4e2042e3babf31467 (diff) | |
| download | STC-modified-fddae5ef07fc0e9a018e56a9843e059a737e4db7.tar.gz STC-modified-fddae5ef07fc0e9a018e56a9843e059a737e4db7.zip | |
Minor fix in coroutine.h
Diffstat (limited to 'include/stc')
| -rw-r--r-- | include/stc/algo/coroutine.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stc/algo/coroutine.h b/include/stc/algo/coroutine.h index 1dd82720..3592b968 100644 --- a/include/stc/algo/coroutine.h +++ b/include/stc/algo/coroutine.h @@ -68,11 +68,11 @@ enum { #define cco_begin(ctx) \ int *_state = &(ctx)->cco_state; \ switch (*_state) { \ - case 0: + case 0: case cco_state_done: #define cco_end(retval) \ *_state = cco_state_done; break; \ - default: assert(0); goto _cco_final_; \ + case -99: goto _cco_final_; \ } \ return retval @@ -111,7 +111,7 @@ enum { #define cco_reset(ctx) \ do { \ int* _state = &(ctx)->cco_state; \ - if (*_state == cco_state_final) *_state = 0; \ + if (*_state == cco_state_done) *_state = 0; \ } while (0) #endif |
