Fix ticket #36, casting non-simple expression.
authorRobert Bradshaw <robertwb@math.washington.edu>
Sun, 3 Aug 2008 05:37:19 +0000 (22:37 -0700)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sun, 3 Aug 2008 05:37:19 +0000 (22:37 -0700)
Cython/Compiler/ExprNodes.py

index 7f2b09c8d1764d72319196add107e747bbbe2a52..75d3a93107dc08197f90c1f70a5867a53fc1e417 100644 (file)
@@ -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)