]> Cypherpunks repositories - gostls13.git/commit
cmd/cgo: wrap generated exports with extern "C" for C++
authorIan Lance Taylor <iant@golang.org>
Thu, 7 May 2015 19:58:43 +0000 (12:58 -0700)
committerIan Lance Taylor <iant@golang.org>
Fri, 8 May 2015 04:23:43 +0000 (04:23 +0000)
commite8fc93ea45ca0147f24f61f5ed48e68b57d473df
tree962916fa38f7a7f19c2138f331c4cfde8e1d0d67
parentfd392ee52b984e655390ad9147c9fe95e82bc459
cmd/cgo: wrap generated exports with extern "C" for C++

This will make it possible for C++ code to #include the export header
file and see the correct declarations.

The preamble remains the user's responsibility.  It would not be
appropriate to wrap the preamble in extern "C", because it might
include header files that work with both C and C++.  Putting those
header files in an extern "C" block would break them.

Change-Id: Ifb40879d709d26596d5c80b1307a49f1bd70932a
Reviewed-on: https://go-review.googlesource.com/9850
Reviewed-by: Minux Ma <minux@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/cgo/out.go