cmd/cgo: tweak doc to not show example of passing Go pointer

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/171360043
This commit is contained in:
Ian Lance Taylor 2014-11-10 08:12:43 -08:00
parent cea69d6877
commit 63fe9efb90
1 changed files with 1 additions and 1 deletions

View File

@ -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: