Message79192
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. |
|
Date |
User |
Action |
Args |
2009-01-05 19:49:40 | lemburg | set | recipients:
+ lemburg, ishimoto, belopolsky, eckhardt |
2009-01-05 19:49:40 | lemburg | link | issue4846 messages |
2009-01-05 19:49:39 | lemburg | create | |
|