diff options
| author | Michael Hudson-Doyle <michael.hudson@canonical.com> | 2015-04-11 10:01:54 +1200 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2015-04-15 16:59:49 +0000 |
| commit | ab4df700b841fcd9a5d249b77c547bad9574d948 (patch) | |
| tree | d6edc85b7486f5cb33bdc4f9bbff2d77a26a97d5 /src/runtime/export_test.go | |
| parent | f7be77e5b61706b6264367c43b78a9a4a93f8f3a (diff) | |
| download | go-ab4df700b841fcd9a5d249b77c547bad9574d948.tar.xz | |
runtime: merge slice and sliceStruct
By removing type slice, renaming type sliceStruct to type slice and
whacking until it compiles.
Has a pleasing net reduction of conversions.
Fixes #10188
Change-Id: I77202b8df637185b632fd7875a1fdd8d52c7a83c
Reviewed-on: https://go-review.googlesource.com/8770
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/export_test.go')
| -rw-r--r-- | src/runtime/export_test.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runtime/export_test.go b/src/runtime/export_test.go index 58ac34283f..905218b22b 100644 --- a/src/runtime/export_test.go +++ b/src/runtime/export_test.go @@ -76,8 +76,10 @@ func GCMask(x interface{}) (ret []byte) { s := (*slice)(unsafe.Pointer(&ret)) systemstack(func() { var len uintptr - getgcmask(e.data, e._type, &s.array, &len) - s.len = uint(len) + var a *byte + getgcmask(e.data, e._type, &a, &len) + s.array = unsafe.Pointer(a) + s.len = int(len) s.cap = s.len }) return |
