go/src/internal/reflectlite
Bryan C. Mills da382a3978 internal/unsafeheader: consolidate stringHeader and sliceHeader declarations 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>
2020-05-01 02:31:29 +00:00
..
all_test.go
asm.s
export_test.go
reflect_mirror_test.go internal/reflectlite: skip TestMirrorWithReflect reflect package source is unavailable 2019-10-11 13:25:59 +00:00
set_test.go internal/reflectlite: updates reflectlite to match runtime rtype/mapType 2019-10-05 23:03:47 +00:00
swapper.go internal/unsafeheader: consolidate stringHeader and sliceHeader declarations into an internal package 2020-05-01 02:31:29 +00:00
tostring_test.go
type.go internal/unsafeheader: consolidate stringHeader and sliceHeader declarations into an internal package 2020-05-01 02:31:29 +00:00
value.go internal/unsafeheader: consolidate stringHeader and sliceHeader declarations into an internal package 2020-05-01 02:31:29 +00:00