1
0
mirror of https://github.com/golang/go synced 2024-11-26 15:46:54 -07:00

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
This commit is contained in:
Miki Tebeka 2013-03-21 20:06:25 -07:00 committed by Brad Fitzpatrick
parent c7ad7a1af4
commit 0ffdfe42d1

View File

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