示例#1
0
文件: parse.go 项目: h12w/cwrap
func (pac *Package) newVariable(t *gcc.Variable) *Variable {
	v := &Variable{
		baseCNamer: newExported(t),
		cgoName:    cgoName(t.CName()),
		conv:       pac.declareEqualType(t.CType()).(Type),
	}
	return v
}
示例#2
0
文件: parse.go 项目: sbinet/cwrap
func (pac *Package) newVariable(t *gcc.Variable) Variable {
	return Variable{
		exported: exported{
			cName: t.CName(),
			file:  t.File(),
		},
		Namer: namer{
			goName:  pac.globalName(t),
			cgoName: "C." + t.CName(),
		},
		conv: pac.getNamer(t.CType()).(Conv),
	}
}