[Mono-list] allow mono to be embedded into c++ applications
Juli Mallett
jmallett@FreeBSD.ORG
Mon, 12 Aug 2002 07:30:37 -0700
* 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