From: Ian Lance Taylor Date: Mon, 10 Nov 2014 16:12:43 +0000 (-0800) Subject: cmd/cgo: tweak doc to not show example of passing Go pointer X-Git-Tag: go1.4rc1~16 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=63fe9efb90a076422c67d34426b0076c2af1d8ab;p=gostls13.git cmd/cgo: tweak doc to not show example of passing Go pointer LGTM=rsc R=rsc CC=golang-codereviews https://golang.org/cl/171360043 --- diff --git a/src/cmd/cgo/doc.go b/src/cmd/cgo/doc.go index 69c7ce893c..6179c7afd1 100644 --- a/src/cmd/cgo/doc.go +++ b/src/cmd/cgo/doc.go @@ -152,7 +152,7 @@ In C, a function argument written as a fixed size array actually requires a pointer to the first element of the array. C compilers are aware of this calling convention and adjust the call accordingly, but Go cannot. In Go, you must pass -the pointer to the first element explicitly: C.f(&x[0]). +the pointer to the first element explicitly: C.f(&C.x[0]). A few special functions convert between Go and C types by making copies of the data. In pseudo-Go definitions: