Merge pull request #85 from cgohlke/patch-6

64 bit proof ImagingNew
This commit is contained in:
Alex Clark ☺ 2013-03-08 11:16:59 -08:00
commit bb74487e96

View File

@ -369,7 +369,7 @@ ImagingNew(const char* mode, int xsize, int ysize)
} else } else
bytes = strlen(mode); /* close enough */ bytes = strlen(mode); /* close enough */
if ((long) xsize * ysize * bytes <= THRESHOLD) { if ((Py_ssize_t) xsize * ysize * bytes <= THRESHOLD) {
im = ImagingNewBlock(mode, xsize, ysize); im = ImagingNewBlock(mode, xsize, ysize);
if (im) if (im)
return im; return im;