Skip to content

Commit

Permalink
bpo-40077: Remove redundant cast in json module (pythonGH-19438)
Browse files Browse the repository at this point in the history
  • Loading branch information
shihai1991 authored Apr 9, 2020
1 parent 97e0de0 commit dcb04d9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Modules/_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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;
}

Expand Down

0 comments on commit dcb04d9

Please sign in to comment.