Skip to content

Commit 25da453

Browse files
committed
Reduce diff
1 parent 83499a4 commit 25da453

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

Modules/_json.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1621,15 +1621,6 @@ encoder_encode_float(PyEncoderObject *s, PyObject *obj)
16211621
return PyFloat_Type.tp_repr(obj);
16221622
}
16231623

1624-
static int
1625-
_steal_accumulate(PyUnicodeWriter *writer, PyObject *stolen)
1626-
{
1627-
/* Append stolen and then decrement its reference count */
1628-
int rval = PyUnicodeWriter_WriteStr(writer, stolen);
1629-
Py_DECREF(stolen);
1630-
return rval;
1631-
}
1632-
16331624
static int
16341625
encoder_write_string(PyEncoderObject *s, PyUnicodeWriter *writer, PyObject *obj)
16351626
{
@@ -1653,6 +1644,15 @@ encoder_write_string(PyEncoderObject *s, PyUnicodeWriter *writer, PyObject *obj)
16531644
return _steal_accumulate(writer, encoded);
16541645
}
16551646

1647+
static int
1648+
_steal_accumulate(PyUnicodeWriter *writer, PyObject *stolen)
1649+
{
1650+
/* Append stolen and then decrement its reference count */
1651+
int rval = PyUnicodeWriter_WriteStr(writer, stolen);
1652+
Py_DECREF(stolen);
1653+
return rval;
1654+
}
1655+
16561656
static int
16571657
encoder_listencode_obj(PyEncoderObject *s, PyUnicodeWriter *writer,
16581658
PyObject *obj,

0 commit comments

Comments
 (0)