Use PyTuple_GET_SIZE since variable is known to be a tuple

This commit is contained in:
Andrew Murray 2021-05-19 19:51:45 +10:00
parent 16b9cadd41
commit ff0c0afb2c

View File

@ -498,7 +498,7 @@ getink(PyObject *color, Imaging im, char *ink) {
be cast to either UINT8 or INT32 */
int rIsInt = 0;
if (PyTuple_Check(color) && PyTuple_Size(color) == 1) {
if (PyTuple_Check(color) && PyTuple_GET_SIZE(color) == 1) {
color = PyTuple_GetItem(color, 0);
}
if (im->type == IMAGING_TYPE_UINT8 || im->type == IMAGING_TYPE_INT32 ||