Hi,

How I can distinguish nsCID from nsCIDPtr with xptinfo?

In C++, the difference is clear like below.  But, I could not tell one
from another, when I deal with these methods with xptinfo.

   // nsCID foo();       in IDL
   NS_IMETHOD Foo(nsCID *_retval); 

   // nsCIDPtr foo2();   in IDL
   NS_IMETHOD Foo2(nsCID * *_retval); 


I tried nsXPTType::IsPointer(), expecting only the later returns
true.  But, nsCID parameter also returned true.  It seems to me
that they looked identical to nsIIDPtr type in terms of
XPTTypeDescriptorPrefix.

I looked into xpconnect and Python XPCOM, but could not figure
out how they treat nsCID type.

What I am trying to do is adding support for nsCID type to the
Ruby language binding, so that I can implement nsIClassInfo with
Ruby.  Currently, I can not implement following attribute, because
nsCID* is mistaken as nsCID**.

   readonly attribute nsCID classID;

Best Regards,
Kenichi Komiya.

Reply via email to