github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/cgo/testdata/flags.out.go (about)

     1  // CGo errors:
     2  //     testdata/flags.go:5:7: invalid #cgo line: NOFLAGS
     3  //     testdata/flags.go:8:13: invalid flag: -fdoes-not-exist
     4  //     testdata/flags.go:29:14: invalid flag: -does-not-exists
     5  
     6  package main
     7  
     8  import "unsafe"
     9  
    10  var _ unsafe.Pointer
    11  
    12  //go:linkname C.CString runtime.cgo_CString
    13  func C.CString(string) *C.char
    14  
    15  //go:linkname C.GoString runtime.cgo_GoString
    16  func C.GoString(*C.char) string
    17  
    18  //go:linkname C.__GoStringN runtime.cgo_GoStringN
    19  func C.__GoStringN(*C.char, uintptr) string
    20  
    21  func C.GoStringN(cstr *C.char, length C.int) string {
    22  	return C.__GoStringN(cstr, uintptr(length))
    23  }
    24  
    25  //go:linkname C.__GoBytes runtime.cgo_GoBytes
    26  func C.__GoBytes(unsafe.Pointer, uintptr) []byte
    27  
    28  func C.GoBytes(ptr unsafe.Pointer, length C.int) []byte {
    29  	return C.__GoBytes(ptr, uintptr(length))
    30  }
    31  
    32  type (
    33  	C.char      uint8
    34  	C.schar     int8
    35  	C.uchar     uint8
    36  	C.short     int16
    37  	C.ushort    uint16
    38  	C.int       int32
    39  	C.uint      uint32
    40  	C.long      int32
    41  	C.ulong     uint32
    42  	C.longlong  int64
    43  	C.ulonglong uint64
    44  )
    45  
    46  const C.BAR = 3
    47  const C.FOO_H = 1