From 071bd124fb4f514957247ce08967cf1810a1fd33 Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Mon, 14 Nov 2022 11:28:06 -0800 Subject: [PATCH] Revert unnecessary change --- simplejson/_speedups.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c index 13dc891..d38522a 100644 --- a/simplejson/_speedups.c +++ b/simplejson/_speedups.c @@ -2805,7 +2805,8 @@ encoder_listencode_obj(PyEncoderObject *s, JSON_Accu *rval, PyObject *obj, Py_ss PyObject *newobj; if (obj == Py_None || obj == Py_True || obj == Py_False) { PyObject *cstr = _encoded_const(obj); - return cstr != NULL ? _steal_accumulate(rval, cstr) : -1; + if (cstr != NULL) + _steal_accumulate(rval, cstr); } else if ((PyBytes_Check(obj) && s->encoding != NULL) || PyUnicode_Check(obj))