diff options
author | Ian Lance Taylor <iant@golang.org> | 2014-11-10 08:12:43 -0800 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2014-11-10 08:12:43 -0800 |
commit | 053d5a0a22df5bbb551e3e23a9693b6c305239f1 (patch) | |
tree | 83447e0b40b30284bf0a62e369c5b837c070953a | |
parent | 2e625ed39b5448efd6fb4356c32d84019f2e08f8 (diff) | |
download | go-053d5a0a22df5bbb551e3e23a9693b6c305239f1.tar.gz |
cmd/cgo: tweak doc to not show example of passing Go pointer
LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/171360043
-rw-r--r-- | src/cmd/cgo/doc.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/cgo/doc.go b/src/cmd/cgo/doc.go index 69c7ce893..6179c7afd 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: |