Skip to content

Commit 056dfe6

Browse files
committed
reflect: undeprecate Value.{Pointer,UnsafeAddr}
Fixes #49187 Change-Id: I4d8c87af8a709f1b909dd4fae3734d422eb36900 Reviewed-on: https://go-review.googlesource.com/c/go/+/359194 Trust: Cuong Manh Le <[email protected]> Run-TryBot: Cuong Manh Le <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
1 parent b2fe2eb commit 056dfe6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/reflect/value.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1934,7 +1934,7 @@ func (v Value) OverflowUint(x uint64) bool {
19341934
// element of the slice. If the slice is nil the returned value
19351935
// is 0. If the slice is empty but non-nil the return value is non-zero.
19361936
//
1937-
// Deprecated: use uintptr(Value.UnsafePointer()) to get the equivalent result.
1937+
// It's preferred to use uintptr(Value.UnsafePointer()) to get the equivalent result.
19381938
func (v Value) Pointer() uintptr {
19391939
k := v.kind()
19401940
switch k {
@@ -2479,7 +2479,7 @@ func (v Value) Uint() uint64 {
24792479
// It is for advanced clients that also import the "unsafe" package.
24802480
// It panics if v is not addressable.
24812481
//
2482-
// Deprecated: use uintptr(Value.Addr().UnsafePointer()) to get the equivalent result.
2482+
// It's preferred to use uintptr(Value.Addr().UnsafePointer()) to get the equivalent result.
24832483
func (v Value) UnsafeAddr() uintptr {
24842484
if v.typ == nil {
24852485
panic(&ValueError{"reflect.Value.UnsafeAddr", Invalid})

0 commit comments

Comments
 (0)