mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-13 07:23:39 +00:00
cgo: add support for nested structs and unions
This commit is contained in:
committed by
Ron Evans
parent
6108ee6859
commit
b153bd63f2
Vendored
+5
@@ -80,6 +80,11 @@ func main() {
|
||||
var _ C.point2d_t = C.point2d_t{x: 3, y: 5}
|
||||
var _ C.point3d_t = C.point3d_t{x: 3, y: 5, z: 7}
|
||||
|
||||
// nested structs/unions
|
||||
var _ C.tagged_union_t
|
||||
var _ C.nested_struct_t
|
||||
var _ C.nested_union_t
|
||||
|
||||
// recursive types, test using a linked list
|
||||
list := &C.list_t{n: 3, next: &C.struct_list_t{n: 6, next: &C.list_t{n: 7, next: nil}}}
|
||||
for list != nil {
|
||||
|
||||
Reference in New Issue
Block a user