From: Jan Ziak <0xe2.0x9a.0x9b@gmail.com> Date: Tue, 18 Sep 2012 18:23:11 +0000 (-0400) Subject: reflect: use []unsafe.Pointer instead of []*int X-Git-Tag: go1.1rc2~2417 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=384af66984c55cf82eaf3f15ca47fb84a31d764d;p=gostls13.git reflect: use []unsafe.Pointer instead of []*int R=rsc CC=golang-dev https://golang.org/cl/6527043 --- diff --git a/src/pkg/reflect/value.go b/src/pkg/reflect/value.go index 9b016465cd..1c3dc9ae9a 100644 --- a/src/pkg/reflect/value.go +++ b/src/pkg/reflect/value.go @@ -490,9 +490,9 @@ func (v Value) call(method string, in []Value) []Value { // TODO(rsc): revisit when reference counting happens. // The values are holding up the in references for us, // but something must be done for the out references. - // For now make everything look like a pointer by pretending - // to allocate a []*int. - args := make([]*int, size/ptrSize) + // For now make everything look like a pointer by allocating + // a []unsafe.Pointer. + args := make([]unsafe.Pointer, size/ptrSize) ptr := uintptr(unsafe.Pointer(&args[0])) off := uintptr(0) if v.flag&flagMethod != 0 {