Bug fix: Process types before converting to go function parameter

lists.
This commit is contained in:
Greg 2019-05-01 11:01:50 -04:00
parent be92b200ad
commit 57ad898945
2 changed files with 5 additions and 5 deletions

View File

@ -217,7 +217,7 @@ func (t *Type) CTypeAttrib() string {
func (t *Type) _CType(attrib bool) string {
if t == nil {
fmt.Println("nil sent to _CType()")
//fmt.Println("nil sent to _CType()")
return ""
}
//if !attrib && c.ctype != "" ... FIXME?

View File

@ -151,7 +151,8 @@ var goreserved map[string]bool = map[string]bool{
"range": true,
}
func (m *Method) gpntp() ([]string,[]*types.Type,string) {
func (w *Wrapper) gpntp(m *Method) ([]string,[]*types.Type,string) {
w.processType(m.Type)
ns := []string{}
tps := []*types.Type{}
if !m.ClassMethod {
@ -166,6 +167,7 @@ func (m *Method) gpntp() ([]string,[]*types.Type,string) {
ns = append(ns,gname)
tps = append(tps,p.Type)
}
w.processTypes(tps)
ret := []string{}
i := 0
if !m.ClassMethod { i = 1 }
@ -488,9 +490,7 @@ func (w *Wrapper) _processMethod(m *Method,fun bool) {
}
cmtype := m.Type.CTypeAttrib()
ns,tps,gplist := m.gpntp()
w.processTypes(tps)
w.processType(m.Type)
ns,tps,gplist := w.gpntp(m)
grtype := m.Type.GoType()
if grtype == "Void" {
grtype = ""