mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-15 10:42:19 +03:00
remove unnecessary pymode variable
This commit is contained in:
parent
126af363af
commit
cad2659497
|
@ -784,8 +784,7 @@ WebPDecode_wrapper(PyObject *self, PyObject *args) {
|
||||||
PyBytesObject *webp_string;
|
PyBytesObject *webp_string;
|
||||||
const uint8_t *webp;
|
const uint8_t *webp;
|
||||||
Py_ssize_t size;
|
Py_ssize_t size;
|
||||||
PyObject *ret = Py_None, *bytes = NULL, *pymode = NULL, *icc_profile = NULL,
|
PyObject *ret = Py_None, *bytes = NULL, *icc_profile = NULL, *exif = NULL;
|
||||||
*exif = NULL;
|
|
||||||
WebPDecoderConfig config;
|
WebPDecoderConfig config;
|
||||||
VP8StatusCode vp8_status_code = VP8_STATUS_OK;
|
VP8StatusCode vp8_status_code = VP8_STATUS_OK;
|
||||||
char *mode = "RGB";
|
char *mode = "RGB";
|
||||||
|
@ -868,13 +867,12 @@ WebPDecode_wrapper(PyObject *self, PyObject *args) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
pymode = PyUnicode_FromString(mode);
|
|
||||||
ret = Py_BuildValue(
|
ret = Py_BuildValue(
|
||||||
"SiiSSS",
|
"SiisSS",
|
||||||
bytes,
|
bytes,
|
||||||
config.output.width,
|
config.output.width,
|
||||||
config.output.height,
|
config.output.height,
|
||||||
pymode,
|
mode,
|
||||||
NULL == icc_profile ? Py_None : icc_profile,
|
NULL == icc_profile ? Py_None : icc_profile,
|
||||||
NULL == exif ? Py_None : exif
|
NULL == exif ? Py_None : exif
|
||||||
);
|
);
|
||||||
|
@ -883,7 +881,6 @@ end:
|
||||||
WebPFreeDecBuffer(&config.output);
|
WebPFreeDecBuffer(&config.output);
|
||||||
|
|
||||||
Py_XDECREF(bytes);
|
Py_XDECREF(bytes);
|
||||||
Py_XDECREF(pymode);
|
|
||||||
Py_XDECREF(icc_profile);
|
Py_XDECREF(icc_profile);
|
||||||
Py_XDECREF(exif);
|
Py_XDECREF(exif);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user