Mark Hammond wrote:
>
> John Bandhauer wrote:
>
> > Yes this is legal, but you've misused it. You can't decalre the
> > second param as type nsISupports. It should be of type nsQIResult
> > - or some '[ptr] native' type that you make up (see the
> > nsQIResult declaration in nsrootidl.idl). The issue is that by
>
> Ahh - OK - that makes sense. So for scripting languages like Python and js, it is
>probably unusable as most '[ptr] native' types wont be supported?
No. It *is* usable. Note that QueryInterface is callable and
implementable in JavaScript. For params with iid_is (that should
be native, but we don't check) the xpidl compiler emits into the
typelib a type of TD_INTERFACE_IS_TYPE rather than TD_VOID that
would otherwise result from a 'native' type. We are overloading
the 'native' declaration for this. We do similar overloadings for
[nsid] and (now) [domstring]. That is why we declare these as
named types in nsrootidl.idl - so people won't have to think
about that implementation detail.
>
> > FWIW, The docs were not written by the person who implemented
> > this stuff and they do have errors.
>
> The first URL I posted had your name at the top ;-)
Sorry, I was guilty of imprecision in my notes to documentors.
>
> > xpctest.idl that uses 'inout' (but not 'in'). Also, the code you
> > sited is in the module I call xpti not xptcall :)
>
> *sigh* I'm having real trouble with terminology here ;-)
>
> So xpti is a "companion" package to xptcall? It would seem to me that one is pretty
>useless without the other, and the xpcom projects page does not refer to xpti, so I
>assumed they were one and the same.
Note that people came along and moved cvs directories at least
once for their own reasons.
libxpt - xpcom/typelib/xpt (libxpt was shaver's name for it)
core C typelib routines, almost independent.
xpidl - xpcom/typelib/xpidl
xpidl compiler. Uses libxpt.
xpti - xpcom/reflect/xptinfo - aka InterfaceInfoManager
xpcom wrapper for typelib system. Used at runtime but
not by the compiler. Uses libxpt.
xptcall - xpcom/reflect/xptcall
platform specific code for calling and implementing
arbitrary interfaces by using type info retrieved from
xpti.
xpconnect - js/src/xpconnect
JavaScript specific mapping for xpcom interfaces.
Uses xpti and xptcall.
xpcom/proxy - xpcom/proxy
cross thread call proxying system.
Uses xpti and xptcall.
John.
>
> Thanks for the clarification...
>
> Mark.