[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: When is the C++ transition needed?

On Thursday 06 October 2005 12:45, Henning Makholm wrote:
> I notice that the newest upload of pstoedit has reverted the C++
> transition name change; instead of libpstoedit0c2 sid now contains
> libpstoedit0, as in sarge.

This is, IMHO, incorrect.

> However, the library exports things with interfaces such as
> #ifdef __cplusplus
> extern "C" DLLEXPORT
> int pstoeditwithghostscript(int argc,
>                             const char *
>                             const argv[],
>                             ostream& errstream,

You must not pass by reference with an extern "C" declaration, because C 
doesn't support that.

>                             const DescriptionRegister* const pushinsPtr=0

You also must not use default parameters, as C does not support that.  The 
alternative implementation with one less/one more parameter would also not 
work because C does not mangle names.

>                             );
> #endif
> Does this not need transitioning for the ABI change?

It does need transitioning.


Attachment: pgph7Xpv1CHI9.pgp
Description: PGP signature

Reply to: