Small patch

Bo Thorsen bo at sonofthor.dk
Thu Jul 31 08:39:39 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 31 July 2003 00:48, Darin Adler wrote:
> On Wednesday, July 30, 2003, at 03:36 PM, Daniel Molkentin wrote:
> > Danimo pointed me to to kjs/simple_number.h that is a good example of
> > something that's very 64 bit unclean.
>
> I didn't think the original was 64-bit unclean.
>
> I looked at your patch, and it looks OK, but I don't understand the
> problem with the original.
>
> There's no need to keep the sign bit in the very highest bit of the
> 64-bit pointer. I want to keep it in bit 31, no matter how big the
> integer is. The value() function is supposed to deal with this by
> extending that sign bit up to all the higher order bits of the long
> integer by or-ing in ~max, which is 111...000...
>
> Could you give a specific example of exactly how the original fails, so
> I can understand my mistake?
>
>      -- Darin

The problem is the max/min of long. I only know of one 64 bit operating 
system that defined long as 32 bit (an MS one), everyone else says it's 
64 bit. But in this code, it's always treated like a 32 bit.

Bo.

- -- 

     Bo Thorsen                 |   Praestevejen 4
     Senior Software Engineer   |   5290 Marslev
     Klarälvdalens Datakonsult  |   Denmark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/KKuhmT99lwfUS5IRArY+AJ0Wl5vkp9qdVZwD5Yt0VOX7vtm7IgCePNhM
wUknXJBSM7p7XfitdoSQvbE=
=Axp3
-----END PGP SIGNATURE-----


More information about the Khtml-devel mailing list