Return bool from isblock function

This commit is contained in:
Christoph Gohlke 2017-10-01 23:39:57 -07:00 committed by GitHub
parent 007adc3134
commit 417dfe4a7b

View File

@ -1756,7 +1756,14 @@ _box_blur(ImagingObject* self, PyObject* args)
static PyObject* static PyObject*
_isblock(ImagingObject* self, PyObject* args) _isblock(ImagingObject* self, PyObject* args)
{ {
return PyInt_FromLong((long) self->image->block); if (self->image->block == NULL) {
Py_INCREF(Py_False);
return Py_False;
}
else {
Py_INCREF(Py_True);
return Py_True;
}
} }
static PyObject* static PyObject*