func (pac *Package) newTypedef(t *gcc.Typedef) *Typedef { var literal SpecWriter if t.IsEnum() { literal = pac.getEqualType(t.Base(), true) } else { literal = pac.getEqualType(t.Base(), false) } conv := ValConv if t.IsFundamental() { conv = NumConv } else if t.IsPointer() { conv = PtrConv } td := &Typedef{ baseCNamer: newExported(t), baseEqualType: baseEqualType{ cgoName: cgoName(t.CName()), size: t.Size(), conv: conv, }, literal: literal, rootId: t.Root().Id(), } return td }