Пример #1
0
func test_char_p_by_p(data []byte) {
	println("test_char_p")
	//var d=make([]byte, 20)
	fmt.Printf("data %s\n", data)
	C.test_char_p((*C.char)(unsafe.Pointer(&data[0])))
	fmt.Printf("data %s\n", data)
	//    println(d)
}
Пример #2
0
func test_char_p() {
	println("test_char_p")
	var d = make([]byte, 20)
	fmt.Printf("data %s\n", d)
	C.test_char_p((*C.char)(unsafe.Pointer(&d[0])))
	fmt.Printf("data %s\n", d)
	//    println(d)
}