]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: ignore top-level qualifiers in function args/results
authorIan Lance Taylor <iant@golang.org>
Wed, 16 Nov 2016 17:55:24 +0000 (09:55 -0800)
committerIan Lance Taylor <iant@golang.org>
Thu, 17 Nov 2016 19:03:55 +0000 (19:03 +0000)
commit7061dc3f6e94dbc369db779ec6799c6f60d3466f
tree19285efd662cc1b7dccb9150cb806d5ab97c1864
parentc1e9760d4ca102539b2d52a7c4021205c29070bf
cmd/cgo: ignore top-level qualifiers in function args/results

The top-level qualifiers are unimportant for our purposes. If a C
function is defined as `const int f(const int i)`, the `const`s are
meaningless to C, and we want to avoid using them in the struct we
create where the `const` has a completely different meaning.

This unwinds https://golang.org/cl/33097 with regard to top-level
qualifiers.

Change-Id: I3d66b0eb43b6d9a586d9cdedfae5a2306b46d96c
Reviewed-on: https://go-review.googlesource.com/33325
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Joe Tsai <thebrokentoaster@gmail.com>
misc/cgo/test/issue17537.go
src/cmd/cgo/gcc.go