mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-13 17:25:49 +03:00
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
This commit is contained in:
parent
8a54f58ac6
commit
aa8d87696b
|
@ -4131,7 +4131,7 @@ _set_blocks_max(PyObject *self, PyObject *args) {
|
|||
}
|
||||
|
||||
if ((unsigned long)blocks_max >
|
||||
SIZE_MAX / sizeof(ImagingDefaultArena.blocks_pool[0])) {
|
||||
SIZE_MAX / sizeof(ImagingDefaultArena.blocks_pool[0])) {
|
||||
PyErr_SetString(PyExc_ValueError, "blocks_max is too large");
|
||||
return NULL;
|
||||
}
|
||||
|
|
|
@ -506,7 +506,8 @@ ImagingNewInternal(const char *mode, int xsize, int ysize, int dirty) {
|
|||
|
||||
MUTEX_LOCK(&ImagingDefaultArena.mutex);
|
||||
Imaging tmp = ImagingAllocateArray(
|
||||
im, &ImagingDefaultArena, dirty, ImagingDefaultArena.block_size);
|
||||
im, &ImagingDefaultArena, dirty, ImagingDefaultArena.block_size
|
||||
);
|
||||
MUTEX_UNLOCK(&ImagingDefaultArena.mutex);
|
||||
if (tmp) {
|
||||
return im;
|
||||
|
|
Loading…
Reference in New Issue
Block a user