【发布时间】:2019-05-26 20:54:34
【问题描述】:
type Foobar C.struct_foobar
对比
type Foobar struct {
foobar C.struct_foobar
}
在为 C lib 编写 Golang 绑定方面,哪一个有哪些(不利)优势?
【问题讨论】:
标签: c go binding shared-libraries wrapper
type Foobar C.struct_foobar
对比
type Foobar struct {
foobar C.struct_foobar
}
在为 C lib 编写 Golang 绑定方面,哪一个有哪些(不利)优势?
【问题讨论】:
标签: c go binding shared-libraries wrapper
第二个示例清楚地显示了其他包无法访问的数据结构。
如果是第一个,这是不可能的。
【讨论】: