From: Hai Shi Date: Thu, 9 Apr 2020 15:10:29 +0000 (+0800) Subject: bpo-40077: Remove redundant cast in json module (GH-19438) X-Git-Tag: v3.9.0a6~163 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=dcb04d9c6dd6f31449ade6765fa4d26a305e7381;p=thirdparty%2FPython%2Fcpython.git bpo-40077: Remove redundant cast in json module (GH-19438) --- diff --git a/Modules/_json.c b/Modules/_json.c index 8117d1601bd3..3ab1cb3d6901 100644 --- a/Modules/_json.c +++ b/Modules/_json.c @@ -1818,7 +1818,7 @@ _json_exec(PyObject *module) } Py_INCREF(state->PyScannerType); if (PyModule_AddObject(module, "make_scanner", state->PyScannerType) < 0) { - Py_DECREF((PyObject*)state->PyScannerType); + Py_DECREF(state->PyScannerType); return -1; } @@ -1828,7 +1828,7 @@ _json_exec(PyObject *module) } Py_INCREF(state->PyEncoderType); if (PyModule_AddObject(module, "make_encoder", state->PyEncoderType) < 0) { - Py_DECREF((PyObject*)state->PyEncoderType); + Py_DECREF(state->PyEncoderType); return -1; }