]> Cypherpunks repositories - gostls13.git/commit
{net,os/user,plugin}: eliminate unnecessary C round-trips
authorBryan C. Mills <bcmills@google.com>
Sat, 13 May 2017 04:01:50 +0000 (00:01 -0400)
committerBryan Mills <bcmills@google.com>
Thu, 17 Aug 2017 18:14:16 +0000 (18:14 +0000)
commitd5b0ec858b3760e93722c13958dea767ab8da34b
tree65f54ece8b1df00ed5d299f47ef1e7839a40ee34
parent6711fa70cecce261662c20613cc63eec0c21a16a
{net,os/user,plugin}: eliminate unnecessary C round-trips

We're making two extra round-trips to C to malloc and free strings
that originate in Go and don't escape. Skip those round-trips by
allocating null-terminated slices in Go memory instead.

Change-Id: I9e4c5ad999a7924ba50b82293c52073ec75518be
Reviewed-on: https://go-review.googlesource.com/56530
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/net/cgo_unix.go
src/os/user/cgo_lookup_unix.go
src/os/user/listgroups_unix.go
src/plugin/plugin_dlopen.go