[Kde-bindings] KDE/kdebindings/csharp/qyoto
Arno Rehn
arno at arnorehn.de
Mon May 28 16:25:14 UTC 2007
Am Montag, 28. Mai 2007 schrieb Richard Dale:
> SVN commit 669114 by rdale:
>
> * Attempted to add a QyotoHash function that will compile on 64 bit
> machines
Hmm, that doesn't even compile on my 32 bit machine.
error: invalid operands of types 'void*' and 'unsigned int' to
binary 'operator&'
When we change it like this:
return (int) (((qint64) o->ptr) & 0xFFFFFFFF);
it works, on both 32 bit and 64 bit.
In this case we wouldn't even need the "& 0xFFFFFFFF" thing, I think. We
should be able to just cast first to an qint64, which would make the compiler
happy, and then to a normal int, which would suit our needs. As this is never
called on a 64 bit machine, it wouldn't cause any data loss. So
return (int) (qint64) o->ptr;
should work as well.
--
Arno Rehn
arno at arnorehn.de
More information about the Kde-bindings
mailing list