From babc0c05221ecb550cfee80e9d2daec508b1fcd8 Mon Sep 17 00:00:00 2001 From: Bob Ippolito Date: Sat, 7 May 2011 09:54:44 -0600 Subject: encoder_listencode_obj recursion check --- simplejson/_speedups.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/simplejson/_speedups.c b/simplejson/_speedups.c index de5f9d6..8b34747 100644 --- a/simplejson/_speedups.c +++ b/simplejson/_speedups.c @@ -2146,7 +2146,8 @@ encoder_listencode_obj(PyEncoderObject *s, PyObject *rval, PyObject *obj, Py_ssi { /* Encode Python object obj to a JSON term, rval is a PyList */ int rv = -1; - + if (Py_EnterRecursiveCall(" while encoding a JSON document")) + return rv; do { if (obj == Py_None || obj == Py_True || obj == Py_False) { PyObject *cstr = _encoded_const(obj); -- cgit v1.2.1