Example #1
0
File: parse.go Project: 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
}
Example #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(),
		}},
	}
}
Example #3
0
func (pac *Package) newStruct(t *gcc.Struct) Struct {
	s := pac.newStructNamer(t)
	s.Fields = pac.newStructFields(t.Fields())
	return s
}