1
0
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:
Gustavo Niemeyer 2012-02-22 17:10:25 -02:00
parent 0c2f3b7ffd
commit 024df9f6c4

View File

@ -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)
}