[Mono-list] Some news about a CORBA ORB implementation for.Net
framework
Michael Meeks
michael@ximian.com
27 Sep 2002 10:13:36 +0100
On Thu, 2002-09-26 at 17:29, Miguel de Icaza wrote:
> Hello,
> > Then you do:
> >
> > args[0] = &first_arg;
> > args[1] = &second_arg;
> > ORBit2_invoke_stub (obj, IMethod_data, &ret, args, NULL, ev);
> >
> > And it all just happens. [ you get the IMethod_data pointer from a type
> > library ]. Of course, this has to be compiled into stubs / skels on the
> > Mono side - sadly; but it's possible to do fully generically.
>
> This is certainly simple, yes. What about the server side?
Essentially exactly the same; the ABI is identical, [ since they have
to match for fast in-proc language->language mapping ]. So, ultimately
you get:
foo_skel (gpointer impl ... IMethod_data, gpointer ret, gptr *args, ev)
{
first_arg = args [0];
second_arg = args [1];
*ret = invoke_c_sharp_whatnot (impl, first_arg, second_arg, ev);
}
of course simplifying horribly :-) and of course if you pass a hefty
sequence across the language boundary it doesn't get copied [ unless
that is forced by one binding or another ], we just exchange pointers to
it etc.
So, we'd implement a custom Mono object adaptor [ as do the Python &
gobject-adaptor bindings ], and it'd just work. The thing is while I can
explain what to do conceptually, it'd take me a long time to get into
the Mono C internals - since really, that's where the mapping has to
happen I think.
HTH,
Michael.
--
mmeeks@gnu.org <><, Pseudo Engineer, itinerant idiot