Skip to content

Commit

Permalink
cgo: fix definition of opaque types
Browse files Browse the repository at this point in the history
Fixes golang#3082.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5683074
  • Loading branch information
niemeyer committed Feb 22, 2012
1 parent 0c2f3b7 commit 024df9f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/cmd/cgo/gcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 024df9f

Please sign in to comment.