[Kde-bindings] Re: Munging of long long

Arno Rehn arno at arnorehn.de
Tue Sep 28 21:21:42 UTC 2010


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...

> > 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.
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!

-- 
Arno Rehn
arno at arnorehn.de



More information about the Kde-bindings mailing list