mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Fix PyArg_ParseTuple format in getink()
Argument r is a PY_LONG_LONG This fixes test failures on powerpc for "LA" images
This commit is contained in:
parent
bc2c933552
commit
c016a12556
|
@ -524,7 +524,7 @@ getink(PyObject* color, Imaging im, char* ink)
|
||||||
if (im->bands == 1) {
|
if (im->bands == 1) {
|
||||||
/* unsigned integer, single layer */
|
/* unsigned integer, single layer */
|
||||||
if (rIsInt != 1) {
|
if (rIsInt != 1) {
|
||||||
if (!PyArg_ParseTuple(color, "i", &r)) {
|
if (!PyArg_ParseTuple(color, "L", &r)) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -540,11 +540,11 @@ getink(PyObject* color, Imaging im, char* ink)
|
||||||
r = (UINT8) r;
|
r = (UINT8) r;
|
||||||
} else {
|
} else {
|
||||||
if (im->bands == 2) {
|
if (im->bands == 2) {
|
||||||
if (!PyArg_ParseTuple(color, "i|i", &r, &a))
|
if (!PyArg_ParseTuple(color, "L|i", &r, &a))
|
||||||
return NULL;
|
return NULL;
|
||||||
g = b = r;
|
g = b = r;
|
||||||
} else {
|
} else {
|
||||||
if (!PyArg_ParseTuple(color, "iii|i", &r, &g, &b, &a))
|
if (!PyArg_ParseTuple(color, "Lii|i", &r, &g, &b, &a))
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user