mirror of
https://github.com/golang/go
synced 2024-11-26 05:07:59 -07:00
reflect: document that InterfaceData is a low-entropy RNG
Change-Id: Ie26b9060630e2e774ac23d8492eaaf785bfca6b7 Reviewed-on: https://go-review.googlesource.com/c/go/+/330709 Reviewed-by: Ian Lance Taylor <iant@golang.org> Trust: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
cce621431a
commit
c309c89db5
@ -1381,10 +1381,16 @@ func valueInterface(v Value, safe bool) interface{} {
|
||||
return packEface(v)
|
||||
}
|
||||
|
||||
// InterfaceData returns the interface v's value as a uintptr pair.
|
||||
// InterfaceData returns a pair of unspecified uintptr values.
|
||||
// It panics if v's Kind is not Interface.
|
||||
//
|
||||
// In earlier versions of Go, this function returned the interface's
|
||||
// value as a uintptr pair. As of Go 1.4, the implementation of
|
||||
// interface values precludes any defined use of InterfaceData.
|
||||
//
|
||||
// Deprecated: The memory representation of interface values is not
|
||||
// compatible with InterfaceData.
|
||||
func (v Value) InterfaceData() [2]uintptr {
|
||||
// TODO: deprecate this
|
||||
v.mustBe(Interface)
|
||||
// We treat this as a read operation, so we allow
|
||||
// it even for unexported data, because the caller
|
||||
|
Loading…
Reference in New Issue
Block a user