Skip to content

Commit 822ea86

Browse files
committed
Reduce diff
1 parent 49a92f3 commit 822ea86

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Modules/_json.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1345,7 +1345,7 @@ write_newline_indent(PyUnicodeWriter *writer,
13451345
Py_ssize_t indent_level, PyObject *indent_cache)
13461346
{
13471347
PyObject *newline_indent = PyList_GET_ITEM(indent_cache, indent_level * 2);
1348-
return _PyUnicodeWriter_WriteStr((_PyUnicodeWriter *)writer, newline_indent);
1348+
return PyUnicodeWriter_WriteStr(writer, newline_indent);
13491349
}
13501350

13511351

@@ -1461,7 +1461,7 @@ static int
14611461
_steal_accumulate(PyUnicodeWriter *writer, PyObject *stolen)
14621462
{
14631463
/* Append stolen and then decrement its reference count */
1464-
int rval = _PyUnicodeWriter_WriteStr((_PyUnicodeWriter *)writer, stolen);
1464+
int rval = PyUnicodeWriter_WriteStr(writer, stolen);
14651465
Py_DECREF(stolen);
14661466
return rval;
14671467
}
@@ -1611,7 +1611,7 @@ encoder_encode_key_value(PyEncoderObject *s, PyUnicodeWriter *writer, bool *firs
16111611
*first = false;
16121612
}
16131613
else {
1614-
if (_PyUnicodeWriter_WriteStr((_PyUnicodeWriter *)writer, item_separator) < 0) {
1614+
if (PyUnicodeWriter_WriteStr(writer, item_separator) < 0) {
16151615
Py_DECREF(keystr);
16161616
return -1;
16171617
}
@@ -1626,7 +1626,7 @@ encoder_encode_key_value(PyEncoderObject *s, PyUnicodeWriter *writer, bool *firs
16261626
if (_steal_accumulate(writer, encoded) < 0) {
16271627
return -1;
16281628
}
1629-
if (_PyUnicodeWriter_WriteStr((_PyUnicodeWriter *)writer, s->key_separator) < 0) {
1629+
if (PyUnicodeWriter_WriteStr(writer, s->key_separator) < 0) {
16301630
return -1;
16311631
}
16321632
if (encoder_listencode_obj(s, writer, value, indent_level, indent_cache) < 0) {
@@ -1789,7 +1789,7 @@ encoder_listencode_list(PyEncoderObject *s, PyUnicodeWriter *writer,
17891789
for (i = 0; i < PySequence_Fast_GET_SIZE(s_fast); i++) {
17901790
PyObject *obj = PySequence_Fast_GET_ITEM(s_fast, i);
17911791
if (i) {
1792-
if (_PyUnicodeWriter_WriteStr((_PyUnicodeWriter *)writer, separator) < 0)
1792+
if (PyUnicodeWriter_WriteStr(writer, separator) < 0)
17931793
goto bail;
17941794
}
17951795
if (encoder_listencode_obj(s, writer, obj, indent_level, indent_cache)) {

0 commit comments

Comments
 (0)