Bug fix: Process types before converting to go function parameter
lists.
This commit is contained in:
		
							parent
							
								
									be92b200ad
								
							
						
					
					
						commit
						57ad898945
					
				| 
						 | 
					@ -217,7 +217,7 @@ func (t *Type) CTypeAttrib() string {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (t *Type) _CType(attrib bool) string {
 | 
					func (t *Type) _CType(attrib bool) string {
 | 
				
			||||||
	if t == nil {
 | 
						if t == nil {
 | 
				
			||||||
		fmt.Println("nil sent to _CType()")
 | 
							//fmt.Println("nil sent to _CType()")
 | 
				
			||||||
		return ""
 | 
							return ""
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	//if !attrib && c.ctype != "" ... FIXME?
 | 
						//if !attrib && c.ctype != "" ... FIXME?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -151,7 +151,8 @@ var goreserved map[string]bool = map[string]bool{
 | 
				
			||||||
	"range": true,
 | 
						"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{}
 | 
						ns := []string{}
 | 
				
			||||||
	tps := []*types.Type{}
 | 
						tps := []*types.Type{}
 | 
				
			||||||
	if !m.ClassMethod {
 | 
						if !m.ClassMethod {
 | 
				
			||||||
| 
						 | 
					@ -166,6 +167,7 @@ func (m *Method) gpntp() ([]string,[]*types.Type,string) {
 | 
				
			||||||
		ns = append(ns,gname)
 | 
							ns = append(ns,gname)
 | 
				
			||||||
		tps = append(tps,p.Type)
 | 
							tps = append(tps,p.Type)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						w.processTypes(tps)
 | 
				
			||||||
	ret := []string{}
 | 
						ret := []string{}
 | 
				
			||||||
	i := 0
 | 
						i := 0
 | 
				
			||||||
	if !m.ClassMethod { i = 1 }
 | 
						if !m.ClassMethod { i = 1 }
 | 
				
			||||||
| 
						 | 
					@ -488,9 +490,7 @@ func (w *Wrapper) _processMethod(m *Method,fun bool) {
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	cmtype := m.Type.CTypeAttrib()
 | 
						cmtype := m.Type.CTypeAttrib()
 | 
				
			||||||
	ns,tps,gplist := m.gpntp()
 | 
						ns,tps,gplist := w.gpntp(m)
 | 
				
			||||||
	w.processTypes(tps)
 | 
					 | 
				
			||||||
	w.processType(m.Type)
 | 
					 | 
				
			||||||
	grtype := m.Type.GoType()
 | 
						grtype := m.Type.GoType()
 | 
				
			||||||
	if grtype == "Void" {
 | 
						if grtype == "Void" {
 | 
				
			||||||
		grtype = ""
 | 
							grtype = ""
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user