From: Shenghou Ma Date: Thu, 14 Aug 2014 15:59:52 +0000 (-0400) Subject: [dev.power64] reflect: now we find one big endian machine X-Git-Tag: go1.5beta1~2684^2~25^2~37 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=b697c120f6ccf30dbc26ce757122f2b4fd908f47;p=gostls13.git [dev.power64] reflect: now we find one big endian machine LGTM=rsc R=rsc, iant CC=golang-codereviews https://golang.org/cl/124350043 --- diff --git a/src/pkg/reflect/value.go b/src/pkg/reflect/value.go index 576cbc3984..50f5315961 100644 --- a/src/pkg/reflect/value.go +++ b/src/pkg/reflect/value.go @@ -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"