aboutsummaryrefslogtreecommitdiffhomepage
path: root/cgo/cgo.go
diff options
context:
space:
mode:
authorAyke van Laethem <[email protected]>2019-06-02 16:22:27 +0200
committerRon Evans <[email protected]>2019-06-03 20:01:47 +0200
commit0ce4d907797d1bdcd8b99606d2e0139e06eaf31a (patch)
tree4d20baf2389451212ff022c241065575dddb20a3 /cgo/cgo.go
parent1047c9bd05b4cbd5491f5dc25904065aa926a65c (diff)
downloadtinygo-0ce4d907797d1bdcd8b99606d2e0139e06eaf31a.tar.gz
tinygo-0ce4d907797d1bdcd8b99606d2e0139e06eaf31a.zip
cgo: add support for anonymous structs
Diffstat (limited to 'cgo/cgo.go')
-rw-r--r--cgo/cgo.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/cgo/cgo.go b/cgo/cgo.go
index 3d02defc7..856149c20 100644
--- a/cgo/cgo.go
+++ b/cgo/cgo.go
@@ -36,6 +36,7 @@ type cgoPackage struct {
typedefs map[string]*typedefInfo
elaboratedTypes map[string]*elaboratedTypeInfo
enums map[string]enumInfo
+ anonStructNum int
}
// constantInfo stores some information about a CGo constant found by libclang
@@ -68,7 +69,7 @@ type typedefInfo struct {
// elaboratedTypeInfo contains some information about an elaborated type
// (struct, union) found in the C AST.
type elaboratedTypeInfo struct {
- typeExpr ast.Expr
+ typeExpr *ast.StructType
pos token.Pos
bitfields []bitfieldInfo
}