diff options
author | Mark Shannon <mark@hotpy.org> | 2017-10-22 21:41:51 (GMT) |
---|---|---|
committer | Antoine Pitrou <pitrou@free.fr> | 2017-10-22 21:41:51 (GMT) |
commit | ae3087c6382011c47db82fea4d05f8bbf514265d (patch) | |
tree | c5d832a760d9898700f1ca397a5a305734b3d77a /Objects/frameobject.c | |
parent | 91dc64ba3f51100540b2ab6c6cd72c3bb18a6d49 (diff) | |
download | cpython-ae3087c6382011c47db82fea4d05f8bbf514265d.zip cpython-ae3087c6382011c47db82fea4d05f8bbf514265d.tar.gz cpython-ae3087c6382011c47db82fea4d05f8bbf514265d.tar.bz2 |
Move exc state to generator. Fixes bpo-25612 (#1773)
Move exception state information from frame objects to coroutine (generator/thread) object where it belongs.
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r-- | Objects/frameobject.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 8739596..6ab3a22 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -379,8 +379,7 @@ static PyGetSetDef frame_getsetlist[] = { * ob_type, ob_size, f_code, f_valuestack; - * f_locals, f_trace, - f_exc_type, f_exc_value, f_exc_traceback are NULL; + * f_locals, f_trace are NULL; * f_localsplus does not require re-allocation and the local variables in f_localsplus are NULL. @@ -438,9 +437,6 @@ frame_dealloc(PyFrameObject *f) Py_DECREF(f->f_globals); Py_CLEAR(f->f_locals); Py_CLEAR(f->f_trace); - Py_CLEAR(f->f_exc_type); - Py_CLEAR(f->f_exc_value); - Py_CLEAR(f->f_exc_traceback); co = f->f_code; if (co->co_zombieframe == NULL) @@ -469,9 +465,6 @@ frame_traverse(PyFrameObject *f, visitproc visit, void *arg) Py_VISIT(f->f_globals); Py_VISIT(f->f_locals); Py_VISIT(f->f_trace); - Py_VISIT(f->f_exc_type); - Py_VISIT(f->f_exc_value); - Py_VISIT(f->f_exc_traceback); /* locals */ slots = f->f_code->co_nlocals + PyTuple_GET_SIZE(f->f_code->co_cellvars) + PyTuple_GET_SIZE(f->f_code->co_freevars); @@ -502,9 +495,6 @@ frame_tp_clear(PyFrameObject *f) f->f_stacktop = NULL; f->f_executing = 0; - Py_CLEAR(f->f_exc_type); - Py_CLEAR(f->f_exc_value); - Py_CLEAR(f->f_exc_traceback); Py_CLEAR(f->f_trace); /* locals */ @@ -698,7 +688,6 @@ _PyFrame_New_NoTrack(PyThreadState *tstate, PyCodeObject *code, f->f_localsplus[i] = NULL; f->f_locals = NULL; f->f_trace = NULL; - f->f_exc_type = f->f_exc_value = f->f_exc_traceback = NULL; } f->f_stacktop = f->f_valuestack; f->f_builtins = builtins; |