aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-10-29 15:55:35 -0600
committerDmitry Vyukov <dvyukov@google.com>2016-11-11 14:32:19 -0800
commit8b731ed4b705c3049af917f1c01db5b4a0bc59a1 (patch)
treec88367ff3b97ab93635983abb599dd93e63c2fe7 /sys
parentb40d502736438fcd899cda22e92fd0a159eecf4f (diff)
sys: replace FilenameType with BufferType{Kind: BufferFilename}
FilenameType is effectively a buffer, there is no need for a separate type.
Diffstat (limited to 'sys')
-rw-r--r--sys/decl.go15
1 files changed, 2 insertions, 13 deletions
diff --git a/sys/decl.go b/sys/decl.go
index 66dc4370a..997298e8a 100644
--- a/sys/decl.go
+++ b/sys/decl.go
@@ -118,6 +118,7 @@ const (
BufferBlobRand BufferKind = iota
BufferBlobRange
BufferString
+ BufferFilename
BufferSockaddr
BufferFilesystem
BufferAlgType
@@ -251,18 +252,6 @@ func (t *IntType) Align() uintptr {
return t.Size()
}
-type FilenameType struct {
- TypeCommon
-}
-
-func (t *FilenameType) Size() uintptr {
- panic("filename size is not statically known")
-}
-
-func (t *FilenameType) Align() uintptr {
- return 1
-}
-
type ArrayKind int
const (
@@ -513,7 +502,7 @@ func ForeachType(meta *Call, f func(Type)) {
}
case *ResourceType, *FileoffType, *BufferType,
*VmaType, *LenType, *FlagsType, *ConstType,
- *StrConstType, *IntType, *FilenameType:
+ *StrConstType, *IntType:
default:
panic("unknown type")
}