[nPATCH] GpgME namespace for C++

Marcus Brinkmann Marcus.Brinkmann at ruhr-uni-bochum.de
Wed May 21 16:20:20 CEST 2003

On Mon, May 19, 2003 at 10:42:31PM +0200, Marc Mutz wrote:
Content-Description: signed data
Content-Description: body text
> Hi!
> This tiny patch moves all gpgme declarations into namespace GpgME for 
> C++. This has no effect on the linkage (b/c everything has "C" linkage, 
> which has no notion of namespaces), it's just for compile-time 
> namespace cleanup.
> I'm not sure if
> shouldn't be
> in gpgme 0.4.x to reverse the default. To keep source compat, 
> GPGME_CLEAN_NAMESPACE should be off by default in 0.3.x.
> Comments?

While extern "C" is usus to be extra friendly to C++ programmers who want to
get a taste of good ol' C again, I don't see any precendence for putting
C libraries into namespaces.  If you want to put it into a namespace, declare
the namespace before including the header file.  Or rather get someone to
write proper C++ classes that wrap the library.

I could also add some struct fields named "throw" and "catch", but I am not
that mean.  I know people who do and are, though... ;)


`Rhubarb is no Egyptian god.' GNU      http://www.gnu.org    marcus at gnu.org
Marcus Brinkmann              The Hurd http://www.gnu.org/software/hurd/
Marcus.Brinkmann at ruhr-uni-bochum.de

More information about the Gnupg-devel mailing list