But not by accident. The thing it's returning is a two-word array even before it's returned and will be one after it's returned and after it's stored.
In short, it's just not two values, it really is one two-word value. -rob On Thu, Jul 14, 2016 at 8:47 AM, Ian Lance Taylor <i...@golang.org> wrote: > On Thu, Jul 14, 2016 at 7:05 AM, <catalas...@gmail.com> wrote: > > http://research.swtch.com/interfaces > > > > is nice for reflect.Value.InterfaceData() to use (uintptr, uintptr)? > > > > Why doesn't it use two-value return? > > I think it's because when Rob added it in 2010 > (https://golang.org/cl/2597041) he was working on the gob package and > use it to assign the values to an existing interface, so a [2]uintptr > was convenient. The use in gob was: > *(*[2]uintptr)(unsafe.Pointer(p)) = ivalue.Get() > > Ian > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.