remove unnecessary pymode variable

This commit is contained in:
Yay295 2024-07-19 08:43:40 -05:00 committed by Yay295
parent 126af363af
commit cad2659497

View File

@ -784,8 +784,7 @@ WebPDecode_wrapper(PyObject *self, PyObject *args) {
PyBytesObject *webp_string;
const uint8_t *webp;
Py_ssize_t size;
PyObject *ret = Py_None, *bytes = NULL, *pymode = NULL, *icc_profile = NULL,
*exif = NULL;
PyObject *ret = Py_None, *bytes = NULL, *icc_profile = NULL, *exif = NULL;
WebPDecoderConfig config;
VP8StatusCode vp8_status_code = VP8_STATUS_OK;
char *mode = "RGB";
@ -868,13 +867,12 @@ WebPDecode_wrapper(PyObject *self, PyObject *args) {
);
}
pymode = PyUnicode_FromString(mode);
ret = Py_BuildValue(
"SiiSSS",
"SiisSS",
bytes,
config.output.width,
config.output.height,
pymode,
mode,
NULL == icc_profile ? Py_None : icc_profile,
NULL == exif ? Py_None : exif
);
@ -883,7 +881,6 @@ end:
WebPFreeDecBuffer(&config.output);
Py_XDECREF(bytes);
Py_XDECREF(pymode);
Py_XDECREF(icc_profile);
Py_XDECREF(exif);