diff options
author | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2021-09-18 10:24:31 +0700 |
---|---|---|
committer | Cuong Manh Le <cuong.manhle.vn@gmail.com> | 2021-10-18 16:32:23 +0000 |
commit | 42515418a99f2540427a5d32189f6d44fb06939e (patch) | |
tree | 30ff40c5c222dfe9c1f552d298e08acfbb0b178c /src/reflect/value.go | |
parent | 417100ec1b08bb1046e207fd08de105944668d27 (diff) | |
download | go-42515418a99f2540427a5d32189f6d44fb06939e.tar.gz go-42515418a99f2540427a5d32189f6d44fb06939e.zip |
reflect: correct documentation of Value.UnsafeAddr
The doc mentions that "UnsafeAddr returns a _pointer_ to v's data", but
it returns a uintptr instead, which don't have pointer semantic.
Change-Id: I557d5597cbc485356ca803eb496a99d6db8c63ba
Reviewed-on: https://go-review.googlesource.com/c/go/+/350690
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: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/reflect/value.go')
-rw-r--r-- | src/reflect/value.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/value.go b/src/reflect/value.go index 449f3bbb3c..6bc02c1c8c 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -2473,7 +2473,7 @@ func (v Value) Uint() uint64 { // which ensures cmd/compile can recognize unsafe.Pointer(v.UnsafeAddr()) // and make an exception. -// UnsafeAddr returns a pointer to v's data. +// UnsafeAddr returns a pointer to v's data, as a uintptr. // It is for advanced clients that also import the "unsafe" package. // It panics if v is not addressable. func (v Value) UnsafeAddr() uintptr { |