Skip to content

Commit e6d8b05

Browse files
ianlancetaylorgopherbot
authored andcommitted
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 <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]>
1 parent 581a63c commit e6d8b05

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

doc/go1.19.html

-5
Original file line numberDiff line numberDiff line change
@@ -299,11 +299,6 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
299299

300300
<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
301301
<dd>
302-
<p><!-- CL 401434 -->
303-
<a href="/pkg/reflect/#SliceHeader"><code>SliceHeader</code></a>
304-
and <a href="/pkg/reflect/#StringHeader"><code>StringHeader</code></a>
305-
are now deprecated, and their use should be avoided.
306-
</p>
307302
<p><!-- CL 357331 -->
308303
TODO: <a href="https://go.dev/cl/357331">https://go.dev/cl/357331</a>: allow Value.Bytes on addressable byte arrays
309304
</p>

src/reflect/value.go

-6
Original file line numberDiff line numberDiff line change
@@ -2667,9 +2667,6 @@ func (v Value) UnsafePointer() unsafe.Pointer {
26672667
// Moreover, the Data field is not sufficient to guarantee the data
26682668
// it references will not be garbage collected, so programs must keep
26692669
// a separate, correctly typed pointer to the underlying data.
2670-
//
2671-
// Deprecated: this type should not be used, it exists only for
2672-
// backward compatibility.
26732670
type StringHeader struct {
26742671
Data uintptr
26752672
Len int
@@ -2681,9 +2678,6 @@ type StringHeader struct {
26812678
// Moreover, the Data field is not sufficient to guarantee the data
26822679
// it references will not be garbage collected, so programs must keep
26832680
// a separate, correctly typed pointer to the underlying data.
2684-
//
2685-
// Deprecated: this type should not be used, it exists only for
2686-
// backward compatibility.
26872681
type SliceHeader struct {
26882682
Data uintptr
26892683
Len int

0 commit comments

Comments
 (0)