Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/go/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Golang C绑定类型设计_C_Go_Binding_Shared Libraries_Wrapper - Fatal编程技术网

Golang C绑定类型设计

Golang C绑定类型设计,c,go,binding,shared-libraries,wrapper,C,Go,Binding,Shared Libraries,Wrapper,vs 为C库编写Golang绑定有哪些(dis)优势?第二个示例清楚地显示了无法从其他包访问的数据结构 对于第一个,这是不可能的 type Foobar C.struct_foobar type Foobar struct { foobar C.struct_foobar }

vs


为C库编写Golang绑定有哪些(dis)优势?

第二个示例清楚地显示了无法从其他包访问的数据结构

对于第一个,这是不可能的

type Foobar C.struct_foobar
type Foobar struct {
    foobar C.struct_foobar
}