diff options
author | da-woods <dw-git@d-woods.co.uk> | 2020-07-29 06:23:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-29 07:23:44 +0200 |
commit | 12a2ad5a090637248200563f4659a583664b70db (patch) | |
tree | 5962e119998e3055a8c9e7d2fc52bea05204f196 | |
parent | 5d8527d196c2ffd45b345ae31cac856f0c8fdc07 (diff) | |
download | cython-12a2ad5a090637248200563f4659a583664b70db.tar.gz |
Don't create CReference in C (only c++) (GH-3746)
-rw-r--r-- | Cython/Compiler/ExprNodes.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 3a2c4cb1b..9c3dd3952 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -10346,7 +10346,10 @@ class DereferenceNode(CUnopNode): def analyse_c_operation(self, env): if self.operand.type.is_ptr: - self.type = PyrexTypes.CReferenceType(self.operand.type.base_type) + if env.is_cpp: + self.type = PyrexTypes.CReferenceType(self.operand.type.base_type) + else: + self.type = self.operand.type.base_type else: self.type_error() |