From bdde3d8a3168dd60de78e1e54cf0770a28afff86 Mon Sep 17 00:00:00 2001 From: Robert Bradshaw Date: Sat, 2 Feb 2008 00:33:42 -0800 Subject: [PATCH] Remove function pointer casting restriction --- Cython/Compiler/ExprNodes.py | 4 ---- 1 file changed, 4 deletions(-) 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 -- 2.26.2