summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2017-07-17 12:15:54 +0200
committerStefan Behnel <stefan_ml@behnel.de>2017-07-17 12:15:54 +0200
commit99c861757b8e24db51d50aaef39334028bd2df2f (patch)
tree983c90a78838c3520a4e7439d60110f02435fa57
parentac3ffe1de6776d225efb994ab046872757a147ea (diff)
downloadcython-99c861757b8e24db51d50aaef39334028bd2df2f.tar.gz
keep type information when coercing C complex to Python complex
-rw-r--r--Cython/Compiler/ExprNodes.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
index 991319990..e364c777f 100644
--- a/Cython/Compiler/ExprNodes.py
+++ b/Cython/Compiler/ExprNodes.py
@@ -1672,7 +1672,7 @@ class ImagNode(AtomicExprNode):
node = ImagNode(self.pos, value=self.value)
if dst_type.is_pyobject:
node.is_temp = 1
- node.type = PyrexTypes.py_object_type
+ node.type = Builtin.complex_type
# We still need to perform normal coerce_to processing on the
# result, because we might be coercing to an extension type,
# in which case a type test node will be needed.