aboutsummaryrefslogtreecommitdiffstats
path: root/sys/decl.go
diff options
context:
space:
mode:
authorAndrey Konovalov <andreyknvl@gmail.com>2017-01-23 18:15:39 +0100
committerGitHub <noreply@github.com>2017-01-23 18:15:39 +0100
commitbb1ff0b5592262d20e88397f56f18e48d47d56ea (patch)
tree6eb2d4bd3090f730f9b91fddd38e2726f1a31034 /sys/decl.go
parentcd23722cf2dabd28d83fa321c3cbf50a956d3fb7 (diff)
parent07880f3c010a2a5d4078b8668e05a4894fd82046 (diff)
Merge pull request #113 from xairy/parent-parent
Make it possible to specify length of parent of parent
Diffstat (limited to 'sys/decl.go')
-rw-r--r--sys/decl.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/decl.go b/sys/decl.go
index a495ffd4a..3c98d1038 100644
--- a/sys/decl.go
+++ b/sys/decl.go
@@ -29,6 +29,7 @@ const (
type Type interface {
Name() string
+ FieldName() string
Dir() Dir
Optional() bool
Default() uintptr
@@ -49,6 +50,7 @@ func IsPad(t Type) bool {
type TypeCommon struct {
TypeName string
+ FldName string // for struct fields and named args
ArgDir Dir
IsOptional bool
}
@@ -57,6 +59,10 @@ func (t *TypeCommon) Name() string {
return t.TypeName
}
+func (t *TypeCommon) FieldName() string {
+ return t.FldName
+}
+
func (t *TypeCommon) Optional() bool {
return t.IsOptional
}