From f085c198ba2dd95ce46a66ec8f8e6b472c3cca14 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 29 Oct 2016 16:06:40 -0600 Subject: sys: replace FileoffType with IntType{Kind: IntFileoff} FileoffType is effectively an int, no need for a separate type. Also remove fd option from fileoff as it is unused and use story is unclear. --- sys/decl.go | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'sys/decl.go') diff --git a/sys/decl.go b/sys/decl.go index 997298e8a..d5ec9a547 100644 --- a/sys/decl.go +++ b/sys/decl.go @@ -97,21 +97,6 @@ func (t *ResourceType) Align() uintptr { return t.Desc.Type.Align() } -type FileoffType struct { - TypeCommon - TypeSize uintptr - BigEndian bool - File string -} - -func (t *FileoffType) Size() uintptr { - return t.TypeSize -} - -func (t *FileoffType) Align() uintptr { - return t.Size() -} - type BufferKind int const ( @@ -232,6 +217,7 @@ const ( IntSignalno IntInaddr IntInport + IntFileoff // offset within a file IntRange ) @@ -500,7 +486,7 @@ func ForeachType(meta *Call, f func(Type)) { for _, opt := range a.Options { rec(opt) } - case *ResourceType, *FileoffType, *BufferType, + case *ResourceType, *BufferType, *VmaType, *LenType, *FlagsType, *ConstType, *StrConstType, *IntType: default: -- cgit mrf-deployment