c,cgo,go中类型转换关系

c,cgo,go中类型转换关系

C语言类型 CGO类型 Go语言类型 SDK
char C.char byte
singed char C.schar int8
unsigned char C.uchar uint8 BYTE
short C.short int16
unsigned short C.ushort uint16 WORD,USHORT
int C.int int32 BOOL,LONG
unsigned int C.uint uint32 DWORD,UINT
long C.long int32
unsigned long C.ulong uint32
long long int C.longlong int64
unsigned long long int C.ulonglong uint64
float C.float float32
double C.double float64
size_t C.size_t uint
void* unsafe.Pointer unsafe.Pointer LPVOID,HANDLE

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 wind.kaisa@gmail.com

×

喜欢就点赞,疼爱就打赏