From: Cuong Manh Le Date: Wed, 27 Oct 2021 17:33:19 +0000 (+0700) Subject: reflect: undeprecate Value.{Pointer,UnsafeAddr} X-Git-Tag: go1.18beta1~713 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=056dfe6ff34fd479ec5c86d9b26a03c639b3f3f7;p=gostls13.git reflect: undeprecate Value.{Pointer,UnsafeAddr} Fixes #49187 Change-Id: I4d8c87af8a709f1b909dd4fae3734d422eb36900 Reviewed-on: https://go-review.googlesource.com/c/go/+/359194 Trust: Cuong Manh Le Run-TryBot: Cuong Manh Le TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor --- diff --git a/src/reflect/value.go b/src/reflect/value.go index 5d9964eb9d..618d38893e 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -1934,7 +1934,7 @@ func (v Value) OverflowUint(x uint64) bool { // element of the slice. If the slice is nil the returned value // is 0. If the slice is empty but non-nil the return value is non-zero. // -// Deprecated: use uintptr(Value.UnsafePointer()) to get the equivalent result. +// It's preferred to use uintptr(Value.UnsafePointer()) to get the equivalent result. func (v Value) Pointer() uintptr { k := v.kind() switch k { @@ -2479,7 +2479,7 @@ func (v Value) Uint() uint64 { // It is for advanced clients that also import the "unsafe" package. // It panics if v is not addressable. // -// Deprecated: use uintptr(Value.Addr().UnsafePointer()) to get the equivalent result. +// It's preferred to use uintptr(Value.Addr().UnsafePointer()) to get the equivalent result. func (v Value) UnsafeAddr() uintptr { if v.typ == nil { panic(&ValueError{"reflect.Value.UnsafeAddr", Invalid})