[Mono-list] allow mono to be embedded into c++ applications

Piers Haken piersh@friskit.com
Mon, 12 Aug 2002 17:36:47 -0700

Beware: names prefixed with underscores are reserved for the compiler
and standard library.

I'd suggest another method.


-----Original Message-----
From: Juli Mallett [mailto:jmallett@FreeBSD.ORG] 
Sent: Monday, August 12, 2002 7:31 AM
To: Joseph Wenninger
Cc: mono-list@ximian.com
Subject: Re: [Mono-list] allow mono to be embedded into c++ applications

* De: Joseph Wenninger <kde@jowenn.at> [ Data: 2002-08-12 ]
	[ Subjecte: [Mono-list] allow mono to be embedded into c++
applications ]
> Hi
> I enclose two patches, which contain my changes, which I had to
> do in the io-layer/atomic.h and the metadata/object.h file. With  
> those patches applied I could use the source copied from  
> samples/embed/teste.c within a C++ application (namely KDE's  
> kate).  
> I hope that it is possible to put them into the mono releases.
> "new" and "this" are C++ keywords, which must not be used as
> variable names in headers, which are to be included into c++ 

To avoid namespace conflicts (such as this), and possible shadowing
issues, function parameter names in prototypes should either be omitted
(my personal
preference) or prefixed with N number of underscores (I think two is
what I usually see).  Lying about the names is wrong, and a good linter
or even compiler will complain that parameter names aren't consistent in
prototype and declaration :)
Juli Mallett <jmallett@FreeBSD.org>       | FreeBSD: The Power To Serve
Will break world for fulltime employment. | finger jmallett@FreeBSD.org

Mono-list maillist  -  Mono-list@ximian.com