diff options
Diffstat (limited to 'Python/marshal.c')
-rw-r--r-- | Python/marshal.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/Python/marshal.c b/Python/marshal.c index 72253ea..d00ac8d 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -798,13 +798,7 @@ r_object(RFILE *p) return v3; case TYPE_CODE: - if (PyEval_GetRestricted()) { - PyErr_SetString(PyExc_RuntimeError, - "cannot unmarshal code objects in " - "restricted execution mode"); - return NULL; - } - else { + { int argcount; int kwonlyargcount; int nlocals; @@ -823,7 +817,7 @@ r_object(RFILE *p) v = NULL; - /* XXX ignore long->int overflows for now */ + /* XXX ignore long->int overflows for now */ argcount = (int)r_long(p); kwonlyargcount = (int)r_long(p); nlocals = (int)r_long(p); @@ -876,8 +870,8 @@ r_object(RFILE *p) Py_XDECREF(name); Py_XDECREF(lnotab); + return v; } - return v; default: /* Bogus data got written, which isn't ideal. |