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

Re: C++ Binding Project?

Bert Peers wrote:

> > > Netscape have defined a platform independent COM/CORBAish
> > > object layout in open source.  With a binary standard defined for the
> > > vtable layout, the objects can be called from within C etc (see other
> > > post) so their approach is sortof half the answer..
> > Beware, binary compatibility is NOT defined by their system!
> ?!?  Wow, thanks

The real COM goes down to defining a binary layout. It cannot really do
that, because it doesn't have the weight to go to compiler makers and
tell them either to emit code that is compatible with their binary
layout or to add a switch to make it so (unlike Microsoft, that makes
Visual C++ automatically emit COM-compliant vtable layout).

On the other hand, it is rarely important. On platforms that have such a
"COM compatibility switch", it is used and is thus adopting the
"standard" COM vtable binary layout and on platform without
"COM-compliant" compilers, care has to be taken anyway with binary
components. Very few compilers do not use the popular CFront layout that
is also the COM definition (if I remember correctly), so things are
mostly okay.

Pierre Phaneuf
Ludus Design, http://ludusdesign.com/
"First they ignore you. Then they laugh at you.
Then they fight you. Then you win." -- Gandhi