mirror of
https://github.com/golang/go
synced 2024-11-24 04:20:03 -07:00
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>
This commit is contained in:
parent
417100ec1b
commit
42515418a9
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user