mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 09:44:31 +03:00
py3k: Fix strict aliasing warnings under Python 3
This commit is contained in:
parent
af5228896a
commit
4459715b6e
|
@ -151,7 +151,7 @@ rehash_collide(HashTable h,
|
||||||
void *newkey,
|
void *newkey,
|
||||||
void *newval)
|
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;
|
Pixel *pixel=(Pixel *)&key;
|
||||||
int i;
|
int i;
|
||||||
Pixel q;
|
Pixel q;
|
||||||
int count=*(int *)&val;
|
int count=(int) val;
|
||||||
|
|
||||||
PIXEL_SCALE(pixel,&q,d->scale);
|
PIXEL_SCALE(pixel,&q,d->scale);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user