summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/reflect/all_test.go2
-rw-r--r--src/lib/reflect/value.go6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/reflect/all_test.go b/src/lib/reflect/all_test.go
index d193efde2..cc61bbbf1 100644
--- a/src/lib/reflect/all_test.go
+++ b/src/lib/reflect/all_test.go
@@ -314,7 +314,7 @@ func TestInterfaceValue(t *testing.T) {
i3 := v2.Interface();
if f, ok := i3.(float); !ok {
- a, typ, c := sys.Reflect(i3);
+ a, typ, c := unsafe.Reflect(i3);
t.Error("v2.Interface() did not return float, got ", typ);
}
}
diff --git a/src/lib/reflect/value.go b/src/lib/reflect/value.go
index ac7ed2f84..c3b50ae68 100644
--- a/src/lib/reflect/value.go
+++ b/src/lib/reflect/value.go
@@ -62,12 +62,12 @@ func (c *commonValue) Interface() interface {} {
case c.typ.Kind() == InterfaceKind:
i = *(*interface{})(c.addr);
case c.typ.Size() > 8: // TODO(rsc): how do we know it is 8?
- i = sys.Unreflect(uint64(uintptr(c.addr)), c.typ.String(), true);
+ i = unsafe.Unreflect(uint64(uintptr(c.addr)), c.typ.String(), true);
default:
if uintptr(c.addr) == 0 {
panicln("reflect: address 0 for", c.typ.String());
}
- i = sys.Unreflect(uint64(uintptr(*(*Addr)(c.addr))), c.typ.String(), false);
+ i = unsafe.Unreflect(uint64(uintptr(*(*Addr)(c.addr))), c.typ.String(), false);
}
return i;
}
@@ -902,7 +902,7 @@ func copyArray(dst ArrayValue, src ArrayValue, n int) {
// NewValue creates a new Value from the interface{} object provided.
func NewValue(e interface {}) Value {
- value, typestring, indir := sys.Reflect(e);
+ value, typestring, indir := unsafe.Reflect(e);
typ, ok := typecache[typestring];
if !ok {
typ = ParseTypeString("", typestring);