1 // Copyright 2013 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
5 // API Compatibility Checks for cgo
10 // const char *api_hello = "hello!";
16 cs = C.CString("hello")
17 defer C.free(unsafe.Pointer(cs))
19 s = C.GoString((*C.char)(C.api_hello))
20 s = C.GoStringN((*C.char)(C.api_hello), C.int(6))
22 b = C.GoBytes(unsafe.Pointer(C.api_hello), C.int(6))