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>
This commit is contained in:
Shenghou Ma 2015-05-18 15:50:00 -04:00 committed by Minux Ma
parent 526b501713
commit 3925a7c5db
12 changed files with 155 additions and 147 deletions

View file

@ -19,9 +19,11 @@ type Handle uintptr
const InvalidHandle = ^Handle(0)
// StringToUTF16 is deprecated. Use UTF16FromString instead.
// If s contains a NUL byte this function panics instead of
// returning an error.
// StringToUTF16 returns the UTF-16 encoding of the UTF-8 string s,
// with a terminating NUL added. If s contains a NUL byte this
// function panics instead of returning an error.
//
// Deprecated: Use UTF16FromString instead.
func StringToUTF16(s string) []uint16 {
a, err := UTF16FromString(s)
if err != nil {
@ -54,9 +56,12 @@ func UTF16ToString(s []uint16) string {
return string(utf16.Decode(s))
}
// StringToUTF16Ptr is deprecated. Use UTF16PtrFromString instead.
// StringToUTF16Ptr returns pointer to the UTF-16 encoding of
// the UTF-8 string s, with a terminating NUL added. If s
// If s contains a NUL byte this function panics instead of
// returning an error.
//
// Deprecated: Use UTF16PtrFromString instead.
func StringToUTF16Ptr(s string) *uint16 { return &StringToUTF16(s)[0] }
// UTF16PtrFromString returns pointer to the UTF-16 encoding of