From e9956226000ab802fc9320ea7a127bd01e1f3281 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 17 Nov 2012 14:10:45 +0100 Subject: [PATCH] when creating temps for C arrays and C functions, use to their respective pointer type --- Cython/Compiler/ExprNodes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index ef8b800..6dd13af 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -9705,7 +9705,12 @@ class CoerceToTempNode(CoercionNode): def __init__(self, arg, env): CoercionNode.__init__(self, arg) - self.type = self.arg.type + temp_type = self.arg.type + if temp_type.is_array: + temp_type = PyrexTypes.c_ptr_type(temp_type.base_type) + elif temp_type.is_cfunction: + temp_type = PyrexTypes.c_ptr_type(temp_type) + self.type = temp_type self.constant_result = self.arg.constant_result self.is_temp = 1 if self.type.is_pyobject: -- 2.7.4