summaryrefslogtreecommitdiff
path: root/vm/type.go
diff options
context:
space:
mode:
Diffstat (limited to 'vm/type.go')
-rw-r--r--vm/type.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/vm/type.go b/vm/type.go
index 88e3dc0..58b6c46 100644
--- a/vm/type.go
+++ b/vm/type.go
@@ -132,3 +132,6 @@ func (t *Type) FieldType(name string) *Type {
}
return nil
}
+
+// IsPtr returns true if type t is of pointer kind.
+func (t *Type) IsPtr() bool { return t.Rtype.Kind() == reflect.Pointer }