]> Cypherpunks repositories - gostls13.git/commit
reflect: restore Value.Pointer implementation
authorCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 19 Oct 2021 17:09:09 +0000 (00:09 +0700)
committerCuong Manh Le <cuong.manhle.vn@gmail.com>
Tue, 19 Oct 2021 18:55:51 +0000 (18:55 +0000)
commitd7149e502dfb13fdc94439eebaf1823a6c6dd84f
tree23721d86e90b6864f40ea35b2db92230555be446
parentd94498470bb09bb0606b0eff3248cb5b35e1a145
reflect: restore Value.Pointer implementation

CL 350691 added Value.UnsafePointer and make Value.Pointer call it
internally. It has a downside that Value.Pointer can now eligible to be
inlined, thus making un-intentional side effect, like the test in
fixedbugs/issue15329.go becomes flaky.

This CL restore Value.Pointer original implementation, pre CL 350691,
with the deprecation TODO removed.

Fixes #49067

Change-Id: I735af182f8e729294333ca906ffc062f477cfc99
Reviewed-on: https://go-review.googlesource.com/c/go/+/356949
Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com>
Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/reflect/value.go