Interfacing with XPCOM

John Reimer terminal.node at
Mon Dec 1 06:53:08 PST 2008

Hello Kagamin,

> G++ uses C++ abstract class for nsISupports, so its methods calling
> convention is C++ as implemented by g++:

Yes, I had a peek at the XULRunner SDK, and it looked something like you say.

Thank you for the link.  It looks like the most significant details of the 
C++ ABI in this case (for XPCOM to D interfacing) are:

(1) name mangling (which won't be an issue in XPCOM from what I understand)
(2) layout and alignment of virtual tables (*important and effectively handled 
by extern(C++) /IF/ the C++ classes meet the criteria specified in the D 

It would be nice if extern(C++) were still ported to D 1.0, but the other 
alternative of enabling extern(System) in COM support (instead of extern(Windows) 
) will also work.  Extern(C++) might turn out to be just another alternative 
which would be nice to have.


More information about the Digitalmars-d mailing list