mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-26 09:01:35 +01:00
Have "return ok" set coro_susp_point = 0.
This commit is contained in:
1 parent
585ea2024d
commit
a12292d094
6 files changed
+60
-15
No files matched your search
@@ -227,6 +227,8 @@ func (g *gen) writeFuncImplBodySuspend(b *buffer) error {
|
||||
// We've reached the end of the function body. Reset the coroutine
|
||||
// suspension point so that the next call to this function starts at
|
||||
// the top.
|
||||
b.writes("\ngoto ok;\n") // Avoid the "unused label" warning.
|
||||
b.writes("ok:\n")
|
||||
b.printf("self->private_impl.%s%s[0].coro_susp_point = 0;\n",
|
||||
cPrefix, g.currFunk.astFunc.Name().String(g.tm))
|
||||
b.writes("goto exit; }\n\n") // Close the coroutine switch.
|
||||
|
||||
Reference in new issue
Block a user