py3k: Fix strict aliasing warnings under Python 3

This commit is contained in:
Brian Crowell 2012-10-13 23:48:01 -05:00 committed by Brian Crowell
parent af5228896a
commit 4459715b6e

View File

@ -151,7 +151,7 @@ rehash_collide(HashTable h,
void *newkey,
void *newval)
{
*valp=(void *)((*(int *)valp)+(*(int *)&newval));
*valp = (void *)(((int) *valp) + ((int) newval));
}
/* %% */
@ -244,7 +244,7 @@ hash_to_list(HashTable h, const void *key, const void *val, void *u)
Pixel *pixel=(Pixel *)&key;
int i;
Pixel q;
int count=*(int *)&val;
int count=(int) val;
PIXEL_SCALE(pixel,&q,d->scale);