bind/vars: update naming scheme

This commit is contained in:
Sebastien Binet 2015-07-28 10:05:13 +02:00
parent 43f0028eb5
commit e4f3f1d4fd
1 changed files with 5 additions and 2 deletions

View File

@ -40,9 +40,12 @@ func getTypedesc(t types.Type) typedesc {
case *types.Named:
switch typ.Underlying().(type) {
case *types.Struct:
obj := typ.Obj()
pkgname := obj.Pkg().Name()
id := pkgname + "_" + obj.Name()
return typedesc{
ctype: "GoPy_" + typ.Obj().Name(),
cgotype: "GoPy_" + typ.Obj().Name(),
ctype: "GoPy_" + id,
cgotype: "GoPy_" + id,
pyfmt: "N",
}
}