]> Cypherpunks repositories - gostls13.git/commitdiff
[dev.power64] reflect: now we find one big endian machine
authorShenghou Ma <minux@golang.org>
Thu, 14 Aug 2014 15:59:52 +0000 (11:59 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 14 Aug 2014 15:59:52 +0000 (11:59 -0400)
LGTM=rsc
R=rsc, iant
CC=golang-codereviews
https://golang.org/cl/124350043

src/pkg/reflect/value.go

index 576cbc3984c82bb782d9f2771a217394a27d8c66..50f5315961a4597c7a1304ea8816186dfb143a7a 100644 (file)
@@ -11,7 +11,7 @@ import (
        "unsafe"
 )
 
-const bigEndian = false // can be smarter if we find a big-endian machine
+const bigEndian = runtime.GOARCH == "power64" // can be smarter if we find more big-endian machines
 const ptrSize = unsafe.Sizeof((*byte)(nil))
 const cannotSet = "cannot set value obtained from unexported struct field"