From: Robert Bradshaw Date: Tue, 23 Sep 2008 17:38:51 +0000 (-0700) Subject: Fix isinstance bug discovered by Lisandro Dalcin X-Git-Tag: 0.9.9.2.beta~91 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=83198d1bb60f5593e3313984a4c8b087f89429d1;p=cython.git Fix isinstance bug discovered by Lisandro Dalcin --- diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py index 64a410b9..000b12ad 100644 --- a/Cython/Compiler/Optimize.py +++ b/Cython/Compiler/Optimize.py @@ -162,7 +162,7 @@ class FinalOptimizePhase(Visitor.CythonTransform): def visit_SimpleCallNode(self, node): self.visitchildren(node) - if node.function.type.is_cfunction: + if node.function.type.is_cfunction and isinstance(node.function, ExprNodes.NameNode): if node.function.name == 'isinstance': type_arg = node.args[1] if type_arg.type.is_builtin_type and type_arg.type.name == 'type':