diff options
author | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-11 22:57:16 -0400 |
---|---|---|
committer | Yury Selivanov <yselivanov@sprymix.com> | 2015-05-11 22:57:16 -0400 |
commit | 7544508f0245173bff5866aa1598c8f6cce1fc5f (patch) | |
tree | bf80850d9cd46fc811f04b8c2484fb50775c697d /Objects/frameobject.c | |
parent | 4e6bf4b3da03b132b0698f30ee931a350585b117 (diff) | |
download | cpython-git-7544508f0245173bff5866aa1598c8f6cce1fc5f.tar.gz |
PEP 0492 -- Coroutines with async and await syntax. Issue #24017.
Diffstat (limited to 'Objects/frameobject.c')
-rw-r--r-- | Objects/frameobject.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 55ee5630f6..172f2cb61b 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -196,6 +196,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno) case SETUP_EXCEPT: case SETUP_FINALLY: case SETUP_WITH: + case SETUP_ASYNC_WITH: blockstack[blockstack_top++] = addr; in_finally[blockstack_top-1] = 0; break; @@ -203,7 +204,8 @@ 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 || setup_op == SETUP_WITH) { + if (setup_op == SETUP_FINALLY || setup_op == SETUP_WITH + || setup_op == SETUP_ASYNC_WITH) { in_finally[blockstack_top-1] = 1; } else { @@ -218,7 +220,8 @@ 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 || setup_op == SETUP_WITH) { + if (setup_op == SETUP_FINALLY || setup_op == SETUP_WITH + || setup_op == SETUP_ASYNC_WITH) { blockstack_top--; } } @@ -281,6 +284,7 @@ frame_setlineno(PyFrameObject *f, PyObject* p_new_lineno) case SETUP_EXCEPT: case SETUP_FINALLY: case SETUP_WITH: + case SETUP_ASYNC_WITH: delta_iblock++; break; |