mirror of
https://github.com/golang/go.git
synced 2025-05-25 01:11:23 +00:00
Revert "reflect: deprecate (Slice|String)Header"
This reverts CL 401434. Reason for revert: We should't deprecate these without a replacement. Fixes #53079 Change-Id: I5515b03e39787d4e528a98c733cdb643b86b17ce Reviewed-on: https://go-review.googlesource.com/c/go/+/408815 Reviewed-by: Ian Lance Taylor <iant@google.com> Auto-Submit: Ian Lance Taylor <iant@google.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Run-TryBot: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
581a63c93c
commit
e6d8b05a61
@ -299,11 +299,6 @@ Do not send CLs removing the interior tags from such phrases.
|
||||
|
||||
<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
|
||||
<dd>
|
||||
<p><!-- CL 401434 -->
|
||||
<a href="/pkg/reflect/#SliceHeader"><code>SliceHeader</code></a>
|
||||
and <a href="/pkg/reflect/#StringHeader"><code>StringHeader</code></a>
|
||||
are now deprecated, and their use should be avoided.
|
||||
</p>
|
||||
<p><!-- CL 357331 -->
|
||||
TODO: <a href="https://go.dev/cl/357331">https://go.dev/cl/357331</a>: allow Value.Bytes on addressable byte arrays
|
||||
</p>
|
||||
|
@ -2667,9 +2667,6 @@ func (v Value) UnsafePointer() unsafe.Pointer {
|
||||
// Moreover, the Data field is not sufficient to guarantee the data
|
||||
// it references will not be garbage collected, so programs must keep
|
||||
// a separate, correctly typed pointer to the underlying data.
|
||||
//
|
||||
// Deprecated: this type should not be used, it exists only for
|
||||
// backward compatibility.
|
||||
type StringHeader struct {
|
||||
Data uintptr
|
||||
Len int
|
||||
@ -2681,9 +2678,6 @@ type StringHeader struct {
|
||||
// Moreover, the Data field is not sufficient to guarantee the data
|
||||
// it references will not be garbage collected, so programs must keep
|
||||
// a separate, correctly typed pointer to the underlying data.
|
||||
//
|
||||
// Deprecated: this type should not be used, it exists only for
|
||||
// backward compatibility.
|
||||
type SliceHeader struct {
|
||||
Data uintptr
|
||||
Len int
|
||||
|
Loading…
x
Reference in New Issue
Block a user