Lv.的博客

c go数据类型对应关系

DataType

C cgo sizeof
--------------------+--------------------+--------------------------------------------
char C.char 1
signed char C.schar 1
unsigned char C.uchar 1
short C.short 2
unsigned short C.ushort 2
int C.int 4
unsigned int C.uint 4
long C.long 4 或 8
unsigned long C.ulong 4 或 8
long long C.longlong 8
unsinged long long C.ulonglong 8
float C.float 4
double C.double 8
void* unsafe.Pointer
Go 学习笔记, 第 4 版
88
char* *C.char
size_t C.size_t
NULL nil

posted @ 2017-03-06 11:11  Avatarx  阅读(892)  评论(0编辑  收藏  举报