github.com/epfl-dcsl/gotee@v0.0.0-20200909122901-014b35f5e5e9/misc/cgo/testgodefs/fieldtypedef.go (about)

     1  // Copyright 2018 The Go Authors. All rights reserve d.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  //
     5  // +build ignore
     6  
     7  package main
     8  
     9  /*
    10  struct S1 { int f1; };
    11  struct S2 { struct S1 s1; };
    12  typedef struct S1 S1Type;
    13  typedef struct S2 S2Type;
    14  */
    15  import "C"
    16  
    17  type S1 C.S1Type
    18  type S2 C.S2Type