[Kde-bindings] Fwd: Qyoto/Kimono: A 64 bit unsafe function, build trouble on Debian unstable
Arno Rehn
arno at arnorehn.de
Mon May 28 12:14:12 UTC 2007
Am Montag, 28. Mai 2007 schrieb Richard Dale:
> On Sunday 27 May 2007, Arno Rehn wrote:
> > qint64 key = (qint64) o->ptr;
> > return (int) ((key >> (8 * sizeof(int) - 1)) ^ key);
>
> Well I tried a quick experiment, and I'm not sure the result has the same
> bytes as the original 'o->ptr' when there are 32 bits to a pointer and for
> ints:
Well, is that necessary at all? We just need a unique number, it doesn't have
to be the pointer... And the returned value is unique since it is 'generated'
from the pointer, isn't it?
--
Arno Rehn
arno at arnorehn.de
More information about the Kde-bindings
mailing list