[Kde-bindings] Re: Munging of long long

Richard Dale richard.dale at telefonica.net
Wed Sep 29 17:11:41 UTC 2010


On Tuesday, September 28, 2010 10:21:42 pm Arno Rehn wrote:
> On Tuesday 28 September 2010 22:17:48 Chris Burel wrote:
> > 2010/9/27 Ryan Melton <ryanmelt at gmail.com>:
> > > Hi,
> > > 
> > > Smoke seems to be munging long long incorrectly (at least sometimes).
> > > 
> > > For example, QBuffer::seek is munged as seek?
> > > 
> > > I think it should be munged as seek$
> > > 
> > > I believe this is because it is in the voidpTypes list.   Why is long
> > > long a voidpType?
> > > 
> > > This is keeping QBuffer:seek from working in Qtruby.
> 
> Actually, munging long long to '?' was what made long longs work in QtRuby
> in the first place. Have to take a look at that...
No, actually long longs don't work in QtRuby because they are munged to '?' - 
if they were '$' it would be fine.

> > > Thanks for any help,
> > > Ryan
> > 
> > I spoke briefly with Arno about this. My understanding is that it is
> > in the voidpTypes list because it is stored as a voidp in the
> > Smoke::StackItem union.  From my experience with the Perl bindings,
> > adding <typeName>long long</typeName> to the list of scalar types in
> > all the smokeconfig.xml files is good enough to force smoke to munge
> > long long to "$".
> > Arno, what do you think?
> 
> Yes, long long is munged to '?' because there is no Smoke::StackItem field
> for long long. So currently long longs are passed by-ref in the s_voidp
> field. I do see that this is not the optimal solution since long long is
> really an integral type and should have its own field.
> The problem is that we can't simply add such a field without seriously
> breaking functionality.
I disagree because kalyptus treated long longs as '$'. It would only affect the 
Qyoto C# bindings I think. I don't know about the differences between the 
kalyptus generated C# sources and the dynamically generated ones in the 
gitorius project though.

> Now that the Smoke API is public, we should try to keep binary
> compatibility and functionality, I think. We've managed to do this for two
> releases, and I would like to keep it that way.
> Since 'long long' isn't even in C++ standard (yet), I personally would like
> to keep it the way it is now.
> 
> If you can come up with solutions that don't break functionality or binary
> compatibility, I'm really happy to hear them!
No long longs as '?' instead of '$' are just broken, and we can't handle them 
in dynamic languages.

-- Richard



More information about the Kde-bindings mailing list