Re: rehash_collide, strict aliasing, and pointer sizes

Brian Crowell <[email protected]> Sat, 13 Oct 2012 23:03:28 -0500
Newsgroups gmane.comp.python.image
Message-ID <CAAQkdDpeYew0B6ED+6n1pGgFigyCAnQkAA96-5MCZxKTKZAL0Q@mail.gmail.com>
On Sat, Oct 13, 2012 at 10:56 PM, Brian Crowell <[email protected]> wrote:
>     union {
>         void *ptr;
>         int val;
>     } uresult, uvalp = { *valp }, unewval = { newval };

...and just after I send that, it occurs to me that the code could
just be trying to store an int in the space reserved for a void
pointer. In that case, I'll go with this:

    *valp = (void *)(((int) *valp) + ((int) newval));

...and later see if that produces warnings on a 64-bit machine.

--Brian
_______________________________________________
Image-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/image-sig