]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: add stringStructOf helper function
authorMatthew Dempsky <mdempsky@google.com>
Tue, 20 Oct 2015 07:35:12 +0000 (00:35 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Tue, 20 Oct 2015 23:13:27 +0000 (23:13 +0000)
commitd4a7ea1b71523115f9baead2d0f98fd8cf517577
treee2c06b78fd0c18d670c95a2b0163108046581fd0
parentef986fa3fc9b8035151e10658de66873bb25bba5
runtime: add stringStructOf helper function

Instead of open-coding conversions from *string to unsafe.Pointer then
to *stringStruct, add a helper function to add some type safety.
Bonus: This caught two **string values being converted to
*stringStruct in heapdump.go.

While here, get rid of the redundant _string type, but add in a
stringStructDWARF type used for generating DWARF debug info.

Change-Id: I8882f8cca66ac45190270f82019a5d85db023bd2
Reviewed-on: https://go-review.googlesource.com/16131
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/link/internal/ld/dwarf.go
src/runtime/env_plan9.go
src/runtime/env_posix.go
src/runtime/hashmap_fast.go
src/runtime/heapdump.go
src/runtime/print.go
src/runtime/runtime2.go
src/runtime/slice.go
src/runtime/string.go