Пример #1
0
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
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(),
		}},
	}
}
Пример #3
0
func (pac *Package) newStruct(t *gcc.Struct) Struct {
	s := pac.newStructNamer(t)
	s.Fields = pac.newStructFields(t.Fields())
	return s
}