mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
merge 3.2 (#14612)
This commit is contained in:
commit
6e3358a1d5
3 changed files with 17 additions and 2 deletions
|
@ -199,6 +199,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
|
|||
case SETUP_LOOP:
|
||||
case SETUP_EXCEPT:
|
||||
case SETUP_FINALLY:
|
||||
case SETUP_WITH:
|
||||
blockstack[blockstack_top++] = addr;
|
||||
in_finally[blockstack_top-1] = 0;
|
||||
break;
|
||||
|
@ -206,7 +207,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
|
|||
case POP_BLOCK:
|
||||
assert(blockstack_top > 0);
|
||||
setup_op = code[blockstack[blockstack_top-1]];
|
||||
if (setup_op == SETUP_FINALLY) {
|
||||
if (setup_op == SETUP_FINALLY || setup_op == SETUP_WITH) {
|
||||
in_finally[blockstack_top-1] = 1;
|
||||
}
|
||||
else {
|
||||
|
@ -221,7 +222,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
|
|||
* be seeing such an END_FINALLY.) */
|
||||
if (blockstack_top > 0) {
|
||||
setup_op = code[blockstack[blockstack_top-1]];
|
||||
if (setup_op == SETUP_FINALLY) {
|
||||
if (setup_op == SETUP_FINALLY || setup_op == SETUP_WITH) {
|
||||
blockstack_top--;
|
||||
}
|
||||
}
|
||||
|
@ -283,6 +284,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno)
|
|||
case SETUP_LOOP:
|
||||
case SETUP_EXCEPT:
|
||||
case SETUP_FINALLY:
|
||||
case SETUP_WITH:
|
||||
delta_iblock++;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue