diff options
author | Robert Bradshaw <robertwb@gmail.com> | 2015-02-03 23:46:34 -0800 |
---|---|---|
committer | Robert Bradshaw <robertwb@gmail.com> | 2015-02-03 23:46:43 -0800 |
commit | 52b8a0e878fa6dd381a3f26c8e269a76958b5ff9 (patch) | |
tree | 8ff2fabcb1504904aff90fb4777bdf57263bbb33 | |
parent | 172f5203f21cf831a8d32079c1665965ca8b13ef (diff) | |
download | cython-52b8a0e878fa6dd381a3f26c8e269a76958b5ff9.tar.gz |
Fix refernce-returning, exception-throwing functions.
Their temporaries can't be references.
-rw-r--r-- | Cython/Compiler/ExprNodes.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index ac28d03e3..590622e21 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -4738,6 +4738,10 @@ class SimpleCallNode(CallNode): self.is_temp = 1 # func_type.exception_check = True + if self.is_temp and self.type.is_reference: + # TODO: Avoid the copy. + self.type = self.type.ref_base_type + # Called in 'nogil' context? self.nogil = env.nogil if (self.nogil and |