mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 08:52:18 +01:00
Remove the cgen receiver for base.utility methods
This commit is contained in:
1 parent
b9cbce9779
commit
852a979d2f
7 files changed
+42
-64
No files matched your search
@@ -319,12 +319,15 @@ func (g *gen) writeExprUserDefinedCall(b *buffer, n *a.Expr, depth uint32) error
|
||||
n.Str(g.tm), recv.MType().Str(g.tm))
|
||||
}
|
||||
qid := recvTyp.QID()
|
||||
b.printf("%s%s__%s(%s", g.packagePrefix(qid), qid[1].Str(g.tm), method.Ident().Str(g.tm), addr)
|
||||
if err := g.writeExpr(b, recv, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
if len(n.Args()) > 0 {
|
||||
b.writeb(',')
|
||||
b.printf("%s%s__%s(", g.packagePrefix(qid), qid[1].Str(g.tm), method.Ident().Str(g.tm))
|
||||
if !recvTyp.Eq(typeExprUtility) {
|
||||
b.writes(addr)
|
||||
if err := g.writeExpr(b, recv, depth); err != nil {
|
||||
return err
|
||||
}
|
||||
if len(n.Args()) > 0 {
|
||||
b.writeb(',')
|
||||
}
|
||||
}
|
||||
return g.writeArgs(b, n.Args(), depth)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user