]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo: clarify C.GoStringN and C.GoBytes docs
authorShenghou Ma <minux@golang.org>
Fri, 16 Oct 2015 21:48:17 +0000 (17:48 -0400)
committerMinux Ma <minux@golang.org>
Fri, 23 Oct 2015 22:23:05 +0000 (22:23 +0000)
Fixes #12427.

Change-Id: I46725620c1e163f3b60ffcd85e5388fa646f074d
Reviewed-on: https://go-review.googlesource.com/15997
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/cgo/doc.go

index 723bbfe6ad55c7f88539c3acd7f64a1ec2c78a5b..a4675bd448342b0ea09ab27e1c4d4484d2e16418 100644 (file)
@@ -189,10 +189,10 @@ by making copies of the data.  In pseudo-Go definitions:
        // C string to Go string
        func C.GoString(*C.char) string
 
-       // C string, length to Go string
+       // C data with explicit length to Go string
        func C.GoStringN(*C.char, C.int) string
 
-       // C pointer, length to Go []byte
+       // C data with explicit length to Go []byte
        func C.GoBytes(unsafe.Pointer, C.int) []byte
 
 C references to Go