aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/malloc.go
diff options
context:
space:
mode:
authorMarcel van Lohuizen <mpvl@golang.org>2019-02-08 17:48:17 +0100
committerMarcel van Lohuizen <mpvl@golang.org>2019-02-27 18:27:01 +0000
commit9650726e79e20386b59b253e98dcaaa768e06c95 (patch)
treecbec3bc830648a2aa767ac2fa9ca31d073da3510 /src/runtime/malloc.go
parentb9596aea50a0703f89c6f11c206cfd2c7dd189fa (diff)
downloadgo-9650726e79e20386b59b253e98dcaaa768e06c95.tar.gz
go-9650726e79e20386b59b253e98dcaaa768e06c95.zip
internal/reflectlite: lite version of reflect package
to be used by errors package for checking assignability and setting error values in As. Updates #29934. Change-Id: I8c1d02a2c6efa0919d54b286cfe8b4edc26da059 Reviewed-on: https://go-review.googlesource.com/c/161759 Run-TryBot: Marcel van Lohuizen <mpvl@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/runtime/malloc.go')
-rw-r--r--src/runtime/malloc.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/malloc.go b/src/runtime/malloc.go
index 8c617bb42b..6695372a3f 100644
--- a/src/runtime/malloc.go
+++ b/src/runtime/malloc.go
@@ -1073,6 +1073,11 @@ func reflect_unsafe_New(typ *_type) unsafe.Pointer {
return mallocgc(typ.size, typ, true)
}
+//go:linkname reflectlite_unsafe_New internal/reflectlite.unsafe_New
+func reflectlite_unsafe_New(typ *_type) unsafe.Pointer {
+ return mallocgc(typ.size, typ, true)
+}
+
// newarray allocates an array of n elements of type typ.
func newarray(typ *_type, n int) unsafe.Pointer {
if n == 1 {