Re: weeding out c++ keywords from sys/sys

From: Christoph Mallon <christoph.mallon_at_gmx.de>
Date: Sun, 15 Feb 2009 19:11:58 +0100
Michael Butler schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I know that using a "wrapper", something like:
> 
> #ifdef __cplusplus
> namespace __whatever
> {
>   extern "C"
>   {
> #endif
> 
> 	[ .. bunch of C prototypes .. ]
> 
> #ifdef __cplusplus
> }
> #endif
> 
>  .. stops C++ from mangling the prototyped functions so they'll link
> correctly but does it temporarily disable the "reserved word" tests?
> Should it? ;-)

No, it doesn't. extern $STRING (the standard only requires "C" and 
"C++", but there can be more) just changes the linkage of declarations 
(name mangling, calling convention).
Received on Sun Feb 15 2009 - 17:12:04 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:42 UTC