summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Ippolito <bob@redivi.com>2022-11-14 11:28:06 -0800
committerBob Ippolito <bob@redivi.com>2022-11-14 11:44:59 -0800
commitda213dc37507c4554f64ba6c55c7e5a9bfae8013 (patch)
tree75d712dca47386b96d5b3391b400f4ddca3628c0
parent41f81a832de7c87210422f4f664aad353822a9bc (diff)
downloadsimplejson-da213dc37507c4554f64ba6c55c7e5a9bfae8013.tar.gz
Revert unnecessary change
-rw-r--r--simplejson/_speedups.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c
index 13dc891..ec054c7 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)
+ rv = _steal_accumulate(rval, cstr);
}
else if ((PyBytes_Check(obj) && s->encoding != NULL) ||
PyUnicode_Check(obj))