mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
Increment coroID per-struct, not per-package
This commit is contained in:
1 parent
4ab2de9b95
commit
b37e55f4a5
2 files changed
+6
-3
No files matched your search
@@ -199,14 +199,16 @@ func (g *gen) writeFuncImpl(b *buffer, n *a.Func) error {
|
||||
}
|
||||
|
||||
func (g *gen) gatherFuncImpl(_ *buffer, n *a.Func) error {
|
||||
coroID := uint32(0)
|
||||
if n.Public() && n.Effect().Coroutine() {
|
||||
g.numPublicCoroutines++
|
||||
g.numPublicCoroutines[n.Receiver()]++
|
||||
coroID = g.numPublicCoroutines[n.Receiver()]
|
||||
}
|
||||
|
||||
g.currFunk = funk{
|
||||
astFunc: n,
|
||||
cName: g.funcCName(n),
|
||||
coroID: g.numPublicCoroutines,
|
||||
coroID: coroID,
|
||||
|
||||
returnsStatus: n.Effect().Coroutine() ||
|
||||
((n.Out() != nil) && n.Out().IsStatus()),
|
||||
|
||||
Reference in new issue
Block a user