1
0
mirror of https://github.com/golang/go synced 2024-10-06 03:11:21 -06:00
go/src/cmd/cgo
Ian Lance Taylor e8fc93ea45 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>
2015-05-08 04:23:43 +00:00
..
ast.go cmd/cgo: readability improvements to generated _cgo_export.h 2015-05-06 22:33:24 +00:00
doc.go cmd/cgo: add -exportheader option 2015-05-07 05:03:23 +00:00
gcc.go cmd/cgo: more robust detection of clang 2015-04-18 01:11:44 +00:00
godefs.go cmd/cgo: remove obsolete -cdefs flag 2015-01-07 22:49:59 +00:00
main.go cmd/cgo: add -exportheader option 2015-05-07 05:03:23 +00:00
out.go cmd/cgo: wrap generated exports with extern "C" for C++ 2015-05-08 04:23:43 +00:00
util.go all: use "reports whether" in place of "returns true if(f)" 2015-03-18 15:14:06 +00:00