Commit e8fc93ea authored by Ian Lance Taylor's avatar Ian Lance Taylor
Browse files

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: default avatarMinux Ma <minux@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: default avatarDavid Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent fd392ee5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment