From 7293bf0ee62b20054a1a5dc5f9e2c0795fd35168 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 2 Aug 2008 22:37:19 -0700 Subject: [PATCH] Fix ticket #36, casting non-simple expression. --- Cython/Compiler/ExprNodes.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 7f2b09c8..75d3a931 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2951,6 +2951,7 @@ class TypecastNode(ExprNode): self.operand = self.operand.coerce_to_pyobject(env) else: warning(self.pos, "No conversion from %s to %s, python object pointer used." % (self.operand.type, self.type)) + self.operand = self.operand.coerce_to_simple(env) elif from_py and not to_py: if self.type.from_py_function: self.operand = self.operand.coerce_to(self.type, env) -- 2.26.2