diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2017-10-31 11:26:58 +0100 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2017-10-31 11:26:58 +0100 |
commit | aeeef39da6a9a136c6880974589fa5bdb277e8d6 (patch) | |
tree | 18e5763ba3b471d80c6b00a9627ce0f203bc2689 /Cython/Compiler/ParseTreeTransforms.py | |
parent | 9c1ef85248ffa89bd470991c5b98dbeb6ca8cb7e (diff) | |
download | cython-aeeef39da6a9a136c6880974589fa5bdb277e8d6.tar.gz |
Implement line tracing for generators and coroutines.
Closes #1949.
Diffstat (limited to 'Cython/Compiler/ParseTreeTransforms.py')
-rw-r--r-- | Cython/Compiler/ParseTreeTransforms.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index cfa51e34d..16b38515d 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -1940,6 +1940,8 @@ if VALUE is not None: binding = self.current_directives.get('binding') rhs = ExprNodes.PyCFunctionNode.from_defnode(node, binding) node.code_object = rhs.code_object + if node.is_generator: + node.gbody.code_object = node.code_object if env.is_py_class_scope: rhs.binding = True |