mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-03-29 14:34:13 +03:00
Merge pull request #76 from cgohlke/patch-1
Don't use C99 compound literals
This commit is contained in:
commit
fe6124ca13
10
_imaging.c
10
_imaging.c
|
@ -254,8 +254,16 @@ int PyImaging_GetBuffer(PyObject* buffer, Py_buffer *view)
|
||||||
|
|
||||||
/* Pretend we support the new protocol; PyBuffer_Release happily ignores
|
/* Pretend we support the new protocol; PyBuffer_Release happily ignores
|
||||||
calling bf_releasebuffer on objects that don't support it */
|
calling bf_releasebuffer on objects that don't support it */
|
||||||
*view = (Py_buffer) {0};
|
view->buf = NULL;
|
||||||
|
view->len = 0;
|
||||||
view->readonly = 1;
|
view->readonly = 1;
|
||||||
|
view->format = NULL;
|
||||||
|
view->ndim = 0;
|
||||||
|
view->shape = NULL;
|
||||||
|
view->strides = NULL;
|
||||||
|
view->suboffsets = NULL;
|
||||||
|
view->itemsize = 0;
|
||||||
|
view->internal = NULL;
|
||||||
|
|
||||||
Py_INCREF(buffer);
|
Py_INCREF(buffer);
|
||||||
view->obj = buffer;
|
view->obj = buffer;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user