Commit 63fe9efb authored by Ian Lance Taylor's avatar Ian Lance Taylor

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

LGTM=rsc
R=rsc
CC=golang-codereviews
https://golang.org/cl/171360043
parent cea69d68
...@@ -152,7 +152,7 @@ In C, a function argument written as a fixed size array ...@@ -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. actually requires a pointer to the first element of the array.
C compilers are aware of this calling convention and adjust C compilers are aware of this calling convention and adjust
the call accordingly, but Go cannot. In Go, you must pass 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 A few special functions convert between Go and C types
by making copies of the data. In pseudo-Go definitions: by making copies of the data. In pseudo-Go definitions:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment