Exemplo n.º 1
0
Arquivo: parse.go Projeto: 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
}
Exemplo n.º 2
0
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),
	}
}