示例#1
0
文件: parse.go 项目: h12w/cwrap
func newStructWithoutFields(t *gcc.Struct) *Struct {
	s := &Struct{
		baseCNamer: newExported(t),
		baseEqualType: baseEqualType{
			cgoName: cgoName(t.CName()),
			size:    t.Size(),
			conv:    ValConv,
		},
	}
	return s
}
示例#2
0
文件: parse.go 项目: sbinet/cwrap
func (pac *Package) newStructNamer(t *gcc.Struct) Struct {
	return Struct{
		exported: exported{
			cName: t.CName(),
			file:  t.File(),
		},
		Conv: Value{namer{
			goName:  pac.globalName(t),
			cgoName: "C." + t.CName(),
		}},
	}
}