]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/cgo: tweak doc to not show example of passing Go pointer
authorIan Lance Taylor <iant@golang.org>
Mon, 10 Nov 2014 16:12:43 +0000 (08:12 -0800)
committerIan Lance Taylor <iant@golang.org>
Mon, 10 Nov 2014 16:12:43 +0000 (08:12 -0800)
LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/171360043

src/cmd/cgo/doc.go

index 69c7ce893c3d1516c8fba1316f3c128c9bbd988a..6179c7afd19eb1d587c5bedce46d5b375c64834b 100644 (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: