From: Robert Bradshaw Date: Sat, 2 Feb 2008 08:33:42 +0000 (-0800) Subject: Remove function pointer casting restriction X-Git-Tag: 0.9.6.14~29^2~50 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=bdde3d8a3168dd60de78e1e54cf0770a28afff86;p=cython.git Remove function pointer casting restriction --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 116c0a37..6f6f6d99 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -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