Remove function pointer casting restriction
authorRobert Bradshaw <robertwb@math.washington.edu>
Sat, 2 Feb 2008 08:33:42 +0000 (00:33 -0800)
committerRobert Bradshaw <robertwb@math.washington.edu>
Sat, 2 Feb 2008 08:33:42 +0000 (00:33 -0800)
Cython/Compiler/ExprNodes.py

index 116c0a37d3a4570fa67bf237a6dce9f5aa50e4ee..6f6f6d993ef563ed417f0454c63a8a78e01eb861 100644 (file)
@@ -2600,10 +2600,6 @@ class TypecastNode(ExprNode):
     def analyse_types(self, env):
         base_type = self.base_type.analyse(env)
         _, self.type = self.declarator.analyse(base_type, env)
-        if self.type.is_cfunction:
-            error(self.pos,
-                "Cannot cast to a function type")
-            self.type = PyrexTypes.error_type
         self.operand.analyse_types(env)
         to_py = self.type.is_pyobject
         from_py = self.operand.type.is_pyobject