[Kde-bindings] KDE/kdebindings/csharp/qyoto

Arno Rehn arno at arnorehn.de
Fri May 18 15:51:16 UTC 2007


Am Freitag, 18. Mai 2007 schrieb Richard Dale:
> On Friday 18 May 2007, Arno Rehn wrote:
> > Am Freitag, 18. Mai 2007 schrieb Richard Dale:
> > > On Friday 18 May 2007, Arno Rehn wrote:
> > > > SVN commit 665951 by arnorehn:
> > > >
> > > > * Made 'ref' arguments work.
> > >
> > > Oh, I wasn't going to implement them like this. It should be just a
> > > matter of adding marshallers for the various ref types, and copying a
> > > pointer to the item on the C# stack to the smoke stack like
> > > Marshall::ToObject below: [...]
> >
> > Ah, I see. I didn't think about this possibility. Shall we change that
> > again or keep it as it is?
>
> Well I haven't looked closely at exactly what you've done, but if it only
> does the same as the simple approach I describe above, I think it would be
> better to change it to work the simpler way. The code in PerlQt was
> designed from the start to work with ref types, but primitive types in ruby
> are immutable and there is no equivalent to the 'ref' arg type in C#, and
> so it isn't implemented very well as it could be in QtRuby.
What it does: After the method is called, it checks whether there are any 
ref-arguements. If that's true, it marshalls the C++ arg-values to C#-values 
and copies them on the C# stack. It basically does the same as your approach, 
but it doesn't need to have any extra marshallers; it uses the existing ones.
I think the two approaches are rather equal in their simplicity.

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list