aboutsummaryrefslogtreecommitdiff
path: root/src/internal/reflectlite/swapper.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/internal/reflectlite/swapper.go')
-rw-r--r--src/internal/reflectlite/swapper.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/internal/reflectlite/swapper.go b/src/internal/reflectlite/swapper.go
index 6330ab2d34..ac081d49bb 100644
--- a/src/internal/reflectlite/swapper.go
+++ b/src/internal/reflectlite/swapper.go
@@ -5,6 +5,7 @@
package reflectlite
import (
+ "internal/goarch"
"internal/unsafeheader"
"unsafe"
)
@@ -36,7 +37,7 @@ func Swapper(slice interface{}) func(i, j int) {
// Some common & small cases, without using memmove:
if hasPtr {
- if size == ptrSize {
+ if size == goarch.PtrSize {
ps := *(*[]unsafe.Pointer)(v.ptr)
return func(i, j int) { ps[i], ps[j] = ps[j], ps[i] }
}