This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

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.
History
Date User Action Args
2009-01-05 19:49:40lemburgsetrecipients: + lemburg, ishimoto, belopolsky, eckhardt
2009-01-05 19:49:40lemburglinkissue4846 messages
2009-01-05 19:49:39lemburgcreate