]> Cypherpunks repositories - gostls13.git/commitdiff
Revert "reflect: deprecate (Slice|String)Header"
authorIan Lance Taylor <iant@golang.org>
Thu, 26 May 2022 17:52:28 +0000 (17:52 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 26 May 2022 18:56:07 +0000 (18:56 +0000)
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>

doc/go1.19.html
src/reflect/value.go

index 5b31b3b52038bb33c856511b6e227ca70df28bf3..7a427cd08afe7773881981896b2168aa08e79e5c 100644 (file)
@@ -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>
index 400f24f9bac92a357a4fac1299e4faf1e92f7fbb..5abdca28207abc446d06ca4dcdb5892452bcc943 100644 (file)
@@ -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