mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-02-04 21:50:54 +03:00
Return bool from isblock function
This commit is contained in:
parent
007adc3134
commit
417dfe4a7b
|
@ -1756,7 +1756,14 @@ _box_blur(ImagingObject* self, PyObject* args)
|
|||
static PyObject*
|
||||
_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*
|
||||
|
|
Loading…
Reference in New Issue
Block a user