mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/cgo: fix for function taking pointer typedef
Fixes #19832 Change-Id: I7ce39c2c435d4716d8a42ac6784b4c87874c0e13 Reviewed-on: https://go-review.googlesource.com/49490 Run-TryBot: Russ Cox <rsc@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
This commit is contained in:
parent
06d87bf854
commit
4a483ce2ab
2 changed files with 22 additions and 0 deletions
|
|
@ -2227,6 +2227,12 @@ func (c *typeConv) FuncArg(dtype dwarf.Type, pos token.Pos) *Type {
|
|||
break
|
||||
}
|
||||
|
||||
// If we already know the typedef for t just use that.
|
||||
// See issue 19832.
|
||||
if def := typedef[t.Go.(*ast.Ident).Name]; def != nil {
|
||||
break
|
||||
}
|
||||
|
||||
t = c.Type(ptr, pos)
|
||||
if t == nil {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue