summaryrefslogtreecommitdiff
path: root/src/internal/unsafeheader
Commit message (Collapse)AuthorAgeFilesLines
* internal/unsafeheader: fix reference in godoc comment for type StringTobias Klauser2020-05-011-1/+1
| | | | | | | | | Refer to reflect.StringHeader in the godoc comment for type String instead of reflect.SliceHeader. Change-Id: I40fc016c7365510a12c41d4ca596f66d2892c3f9 Reviewed-on: https://go-review.googlesource.com/c/go/+/231537 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
* internal/unsafeheader: consolidate stringHeader and sliceHeader declarations ↵Bryan C. Mills2020-05-012-0/+137
into an internal package The new package "internal/unsafeheader" depends only on "unsafe", and provides declarations equivalent to reflect.StringHeader and reflect.SliceHeader but with Data fields of the proper unsafe.Pointer type (instead of uintptr). Unlike the types it replaces, the "internal/unsafeheader" package has a regression test to ensure that its header types remain equivalent to the declarations provided by the "reflect" package. Since "internal/unsafeheader" has almost no dependencies, it can be used in other low-level packages such as "syscall" and "reflect". This change is based on the corresponding x/sys change in CL 231177. Fixes #37805 Updates #19367 Change-Id: I7a6d93ef8dd6e235bcab94e7c47270aad047af31 Reviewed-on: https://go-review.googlesource.com/c/go/+/231223 Reviewed-by: Ian Lance Taylor <iant@golang.org>