diff options
| author | Shenghou Ma <minux@golang.org> | 2015-05-18 15:50:00 -0400 |
|---|---|---|
| committer | Minux Ma <minux@golang.org> | 2015-06-18 19:16:23 +0000 |
| commit | 3925a7c5dbde952a94fc4c46686d78bb1ff71ed8 (patch) | |
| tree | 0e187638406044a61b3027e148b48c83399565ca /src/syscall/exec_plan9.go | |
| parent | 526b5017133f193b8f82912936288f1ea767ffca (diff) | |
| download | go-3925a7c5dbde952a94fc4c46686d78bb1ff71ed8.tar.xz | |
all: switch to the new deprecation convention
While we're at it, move some misplaced comment blocks around.
Change-Id: I1847d7f1ca1dbb8e5de737203c4ed6c66e112508
Reviewed-on: https://go-review.googlesource.com/10188
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Diffstat (limited to 'src/syscall/exec_plan9.go')
| -rw-r--r-- | src/syscall/exec_plan9.go | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/syscall/exec_plan9.go b/src/syscall/exec_plan9.go index ed358385b9..7a415fd31e 100644 --- a/src/syscall/exec_plan9.go +++ b/src/syscall/exec_plan9.go @@ -61,9 +61,11 @@ import ( var ForkLock sync.RWMutex -// StringSlicePtr is deprecated. Use SlicePtrFromStrings instead. -// If any string contains a NUL byte this function panics instead -// of returning an error. +// StringSlicePtr converts a slice of strings to a slice of pointers +// to NUL-terminated byte arrays. If any string contains a NUL byte +// this function panics instead of returning an error. +// +// Deprecated: Use SlicePtrFromStrings instead. func StringSlicePtr(ss []string) []*byte { bb := make([]*byte, len(ss)+1) for i := 0; i < len(ss); i++ { @@ -74,7 +76,7 @@ func StringSlicePtr(ss []string) []*byte { } // SlicePtrFromStrings converts a slice of strings to a slice of -// pointers to NUL-terminated byte slices. If any string contains +// pointers to NUL-terminated byte arrays. If any string contains // a NUL byte, it returns (nil, EINVAL). func SlicePtrFromStrings(ss []string) ([]*byte, error) { var err error |
