diff options
author | Bob Ippolito <bob@redivi.com> | 2011-05-07 09:54:44 -0600 |
---|---|---|
committer | Bob Ippolito <bob@redivi.com> | 2011-05-07 09:54:44 -0600 |
commit | babc0c05221ecb550cfee80e9d2daec508b1fcd8 (patch) | |
tree | 9f4035c91a60e5428aff90e667917a085e52023f | |
parent | e226e3c66984800e9bc6533c31e81b0c553e1f48 (diff) | |
download | simplejson-recursion_control-11.tar.gz |
encoder_listencode_obj recursion checkrecursion_control-11
-rw-r--r-- | simplejson/_speedups.c | 3 |
1 files changed, 2 insertions, 1 deletions
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); |