mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 00:55:11 +01:00
Clean up cgen's writeResumeSuspend
This commit is contained in:
1 parent
b10098a7f2
commit
e55ce7d798
3 files changed
+9
-168
No files matched your search
@@ -282,11 +282,7 @@ func (g *gen) writeFuncImplBodyResume(b *buffer) error {
|
||||
b.printf("uint32_t coro_susp_point = self->private_impl.%s%s[0].coro_susp_point;\n",
|
||||
cPrefix, g.currFunk.astFunc.FuncName().Str(g.tm))
|
||||
b.printf("if (coro_susp_point) {\n")
|
||||
if err := g.writeResumeSuspend(b, &g.currFunk, false, false); err != nil {
|
||||
return err
|
||||
}
|
||||
b.writes("} else {\n")
|
||||
if err := g.writeResumeSuspend(b, &g.currFunk, false, true); err != nil {
|
||||
if err := g.writeResumeSuspend(b, &g.currFunk, false); err != nil {
|
||||
return err
|
||||
}
|
||||
b.writes("}\n")
|
||||
@@ -322,7 +318,7 @@ func (g *gen) writeFuncImplBodySuspend(b *buffer) error {
|
||||
|
||||
b.printf("self->private_impl.%s%s[0].coro_susp_point = coro_susp_point;\n",
|
||||
cPrefix, g.currFunk.astFunc.FuncName().Str(g.tm))
|
||||
if err := g.writeResumeSuspend(b, &g.currFunk, true, false); err != nil {
|
||||
if err := g.writeResumeSuspend(b, &g.currFunk, true); err != nil {
|
||||
return err
|
||||
}
|
||||
b.writes("\n")
|
||||
|
||||
Reference in new issue
Block a user