[Python-checkins] bpo-40077: Remove redundant cast in json module (GH-19438)
Hai Shi
webhook-mailer at python.org
Thu Apr 9 11:10:37 EDT 2020
https://github.com/python/cpython/commit/dcb04d9c6dd6f31449ade6765fa4d26a305e7381
commit: dcb04d9c6dd6f31449ade6765fa4d26a305e7381
branch: master
author: Hai Shi <shihai1992 at gmail.com>
committer: GitHub <noreply at github.com>
date: 2020-04-10T00:10:29+09:00
summary:
bpo-40077: Remove redundant cast in json module (GH-19438)
files:
M Modules/_json.c
diff --git a/Modules/_json.c b/Modules/_json.c
index 8117d1601bd3f..3ab1cb3d69018 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;
}
More information about the Python-checkins
mailing list