Message79192
| Author |
lemburg |
| Recipients |
belopolsky, eckhardt, ishimoto, lemburg |
| Date |
2009年01月05日.19:49:39 |
| SpamBayes Score |
0.0056931856 |
| Marked as misclassified |
No |
| Message-id |
<49626452.6070207@egenix.com> |
| In-reply-to |
<1231178091.58.0.0746939027873.issue4846@psf.upfronthosting.co.za> |
| Content |
On 2009年01月05日 18:54, Alexander Belopolsky wrote:
> I also wonder whether it would be more appropriate to redefine PyAPI_*
> macros to declare API symbols with extern "C" when compiled under C++?
> This seems to be a better approach than cluttering all header files with
> #ifdef __cplusplus and worrying about the scope of extern "C" {}
> wrappers.
This is standard practice, but of course has to be done with some
care.
In general, only macro and type definitions should live outside
the extern "C" sections, #includes must live outside those sections.
Changing the PyAPI_* macros would help with this, but I'm not sure whether
that's a catch-all solution. If it's not, then it's better to stick
with the extern "C" sections. |
|