From: Ian Lance Taylor Date: Thu, 26 May 2022 17:52:28 +0000 (+0000) Subject: Revert "reflect: deprecate (Slice|String)Header" X-Git-Tag: go1.19beta1~113 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=e6d8b05a61e3977f5769e8e896d24d2d26dcb23c;p=gostls13.git 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 Auto-Submit: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov Run-TryBot: Ian Lance Taylor TryBot-Result: Gopher Robot Reviewed-by: Dmitri Shuralyov Run-TryBot: Ian Lance Taylor --- diff --git a/doc/go1.19.html b/doc/go1.19.html index 5b31b3b520..7a427cd08a 100644 --- a/doc/go1.19.html +++ b/doc/go1.19.html @@ -299,11 +299,6 @@ Do not send CLs removing the interior tags from such phrases.
reflect
-

- SliceHeader - and StringHeader - are now deprecated, and their use should be avoided. -

TODO: https://go.dev/cl/357331: allow Value.Bytes on addressable byte arrays

diff --git a/src/reflect/value.go b/src/reflect/value.go index 400f24f9ba..5abdca2820 100644 --- a/src/reflect/value.go +++ b/src/reflect/value.go @@ -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