From 056dfe6ff34fd479ec5c86d9b26a03c639b3f3f7 Mon Sep 17 00:00:00 2001 From: Cuong Manh Le Date: Thu, 28 Oct 2021 00:33:19 +0700 Subject: [PATCH] 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 --- src/reflect/value.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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}) -- 2.50.0