diff options
| author | Russ Cox <rsc@golang.org> | 2024-05-22 15:46:02 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-05-23 01:17:26 +0000 |
| commit | 4cac885741b845bd7f4aaad5bc9844b44eb23136 (patch) | |
| tree | ed100e299cb58e1783aaf80f18b2375555d024d2 /src/runtime/string.go | |
| parent | 05cbbf985fed823a174bf95cc78a7d44f948fdab (diff) | |
| download | go-4cac885741b845bd7f4aaad5bc9844b44eb23136.tar.xz | |
all: document legacy //go:linkname for modules with ≥200 dependents
Ignored these linknames which have not worked for a while:
github.com/xtls/xray-core:
context.newCancelCtx removed in CL 463999 (Feb 2023)
github.com/u-root/u-root:
funcPC removed in CL 513837 (Jul 2023)
tinygo.org/x/drivers:
net.useNetdev never existed
For #67401.
Change-Id: I9293f4ef197bb5552b431de8939fa94988a060ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/587576
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/runtime/string.go')
| -rw-r--r-- | src/runtime/string.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime/string.go b/src/runtime/string.go index d45888b7a8..5bdb25b9db 100644 --- a/src/runtime/string.go +++ b/src/runtime/string.go @@ -78,6 +78,16 @@ func concatstring5(buf *tmpBuf, a0, a1, a2, a3, a4 string) string { // n is the length of the slice. // Buf is a fixed-size buffer for the result, // it is not nil if the result does not escape. +// +// slicebytetostring should be an internal detail, +// but widely used packages access it using linkname. +// Notable members of the hall of shame include: +// - github.com/cloudwego/frugal +// +// Do not remove or change the type signature. +// See go.dev/issue/67401. +// +//go:linkname slicebytetostring func slicebytetostring(buf *tmpBuf, ptr *byte, n int) string { if n == 0 { // Turns out to be a relatively common case. |
