use unsafe.pointer in reflection objects
R=rsc
DELTA=326 (4 added, 259 deleted, 63 changed)
OCL=20853
CL=20856
diff --git a/src/lib/fmt/print.go b/src/lib/fmt/print.go
index 5a2dc67..05e2087 100644
--- a/src/lib/fmt/print.go
+++ b/src/lib/fmt/print.go
@@ -272,10 +272,10 @@
return 0.0, false;
}
-func getPtr(v reflect.Value) (val uint64, ok bool) {
+func getPtr(v reflect.Value) (val uintptr, ok bool) {
switch v.Kind() {
case reflect.PtrKind:
- return v.(reflect.PtrValue).Get(), true;
+ return uintptr(v.(reflect.PtrValue)), true;
}
return 0, false;
}
@@ -356,7 +356,7 @@
} else {
p.add('0');
p.add('x');
- s = p.fmt.uX64(v).str();
+ s = p.fmt.uX64(uint64(v)).str();
}
}
case reflect.StructKind:
@@ -555,7 +555,7 @@
if v == nil {
s = "<nil>"
} else {
- s = "0x" + p.fmt.uX64(v).str()
+ s = "0x" + p.fmt.uX64(uint64(v)).str()
}
} else {
goto badtype