Skip to content

Commit 38e11d0

Browse files
committed
cmd/compile: use *byte for pointer to string memory
Change-Id: I14cff013ef4920d33b5ead0c75d51681bb4f635a Reviewed-on: https://go-review.googlesource.com/21337 Run-TryBot: Matthew Dempsky <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 8bc9c57 commit 38e11d0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/cmd/compile/internal/gc/cgen.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3469,11 +3469,7 @@ func cgen_slice(n, res *Node, wb bool) {
34693469
} else {
34703470
var ptr *Type
34713471
if n.Op == OSLICESTR {
3472-
// Yikes! Ptrto(nil)?!
3473-
// Prior to CL 21331, that's what this code did implicitly.
3474-
// Now it does it explicitly, to safely preserve old behavior.
3475-
// This will all be replaced by SSA anyway.
3476-
ptr = Ptrto(nil)
3472+
ptr = ptrToUint8
34773473
} else {
34783474
ptr = Ptrto(n.Type.Elem())
34793475
}

0 commit comments

Comments
 (0)