C.char C.schar (signed char) C.uchar (unsigned char) C.short C.ushort (unsigned short) C.int C.uint (unsigned int) C.long C.ulong (unsigned long) C.longlong (long long) C.ulonglong (unsigned long long) C.float C.double. unsafe.Pointer (void*) // Go string to C string func C.CString(string) *C.char var val []byte (*C.char)(unsafe.Pointer(&val[0]))
有疑问加站长微信联系(非本文作者)