mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
Merge pull request #1224 from lkesteloot/master
Release GIL during image load (decode).
This commit is contained in:
commit
c70e166a77
5
decode.c
5
decode.c
|
@ -116,12 +116,17 @@ _decode(ImagingDecoderObject* decoder, PyObject* args)
|
|||
{
|
||||
UINT8* buffer;
|
||||
int bufsize, status;
|
||||
ImagingSectionCookie cookie;
|
||||
|
||||
if (!PyArg_ParseTuple(args, PY_ARG_BYTES_LENGTH, &buffer, &bufsize))
|
||||
return NULL;
|
||||
|
||||
ImagingSectionEnter(&cookie);
|
||||
|
||||
status = decoder->decode(decoder->im, &decoder->state, buffer, bufsize);
|
||||
|
||||
ImagingSectionLeave(&cookie);
|
||||
|
||||
return Py_BuildValue("ii", status, decoder->state.errcode);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user