From 8408276038d73d522b857cadb988cd593c77459e Mon Sep 17 00:00:00 2001 From: Sebastien Binet Date: Tue, 5 Jan 2016 15:17:02 +0100 Subject: [PATCH] bind: streamline func-name registration --- bind/gencpy_func.go | 4 ++-- bind/gengo.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bind/gencpy_func.go b/bind/gencpy_func.go index 6c2c7e9..9a25dfd 100644 --- a/bind/gencpy_func.go +++ b/bind/gencpy_func.go @@ -285,8 +285,8 @@ func (g *cpyGen) genFuncBody(f Func) { } g.impl.Printf("cgopy_seq_send(%q, %d, ibuf->buf, ibuf->len, &obuf->buf, &obuf->len);\n\n", - g.pkg.ImportPath()+"."+f.GoName(), - uhash(f.GoName()), + f.Package().ImportPath()+"."+f.GoName(), + uhash(f.ID()), ) if len(res) <= 0 { diff --git a/bind/gengo.go b/bind/gengo.go index 45c0478..ae3feee 100644 --- a/bind/gengo.go +++ b/bind/gengo.go @@ -163,8 +163,8 @@ func cgo_func_%[1]s(out, in *seq.Buffer) { g.Printf("}\n\n") g.regs = append(g.regs, goReg{ - Descriptor: g.pkg.ImportPath() + "." + f.GoName(), - ID: uhash(f.GoName()), + Descriptor: f.Package().ImportPath() + "." + f.GoName(), + ID: uhash(f.ID()), Func: f.ID(), }) }