From: Miki Tebeka Date: Fri, 22 Mar 2013 03:06:25 +0000 (-0700) Subject: cmd/cgo: fix the cgo example on multiple assignment context. X-Git-Tag: go1.1rc2~389 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=0ffdfe42d169bf54ac60240822bb9032648af4c7;p=gostls13.git cmd/cgo: fix the cgo example on multiple assignment context. Change from atoi to strtol since atoi does not set errno. R=golang-dev, minux.ma, rsc, bradfitz CC=golang-dev https://golang.org/cl/7888047 --- diff --git a/src/cmd/cgo/doc.go b/src/cmd/cgo/doc.go index 3893f7deb5..efbeae9588 100644 --- a/src/cmd/cgo/doc.go +++ b/src/cmd/cgo/doc.go @@ -70,7 +70,7 @@ assignment context to retrieve both the return value (if any) and the C errno variable as an error (use _ to skip the result value if the function returns void). For example: - n, err := C.atoi("abc") + n, err := C.sqrt(-1) _, err := C.voidFunc() In C, a function argument written as a fixed size array