mirror of
https://github.com/golang/go
synced 2024-11-12 02:00:23 -07:00
cgo: fix definition of opaque types
Fixes #3082. R=golang-dev, rsc CC=golang-dev https://golang.org/cl/5683074
This commit is contained in:
parent
0c2f3b7ffd
commit
024df9f6c4
@ -1164,6 +1164,7 @@ func (c *typeConv) Type(dtype dwarf.Type, pos token.Pos) *Type {
|
||||
goIdent[name.Name] = name
|
||||
switch dt.Kind {
|
||||
case "union", "class":
|
||||
t.Go = c.Opaque(t.Size)
|
||||
if t.C.Empty() {
|
||||
t.C.Set("typeof(unsigned char[%d])", t.Size)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user