summaryrefslogtreecommitdiff
path: root/libgo/go/reflect/swapper.go
diff options
context:
space:
mode:
Diffstat (limited to 'libgo/go/reflect/swapper.go')
-rw-r--r--libgo/go/reflect/swapper.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/libgo/go/reflect/swapper.go b/libgo/go/reflect/swapper.go
index 016f95d7b01..0cf40666b1e 100644
--- a/libgo/go/reflect/swapper.go
+++ b/libgo/go/reflect/swapper.go
@@ -4,7 +4,10 @@
package reflect
-import "unsafe"
+import (
+ "internal/unsafeheader"
+ "unsafe"
+)
// Swapper returns a function that swaps the elements in the provided
// slice.
@@ -58,7 +61,7 @@ func Swapper(slice interface{}) func(i, j int) {
}
}
- s := (*sliceHeader)(v.ptr)
+ s := (*unsafeheader.Slice)(v.ptr)
tmp := unsafe_New(typ) // swap scratch space
return func(i, j int) {