Fix DebugTransform compiler crash
authorMark Florisson <eggy.nospam@gmail.com>
Sat, 13 Nov 2010 12:54:07 +0000 (13:54 +0100)
committerMark Florisson <eggy.nospam@gmail.com>
Sat, 13 Nov 2010 12:54:07 +0000 (13:54 +0100)
Cython/Compiler/ParseTreeTransforms.py

index b3ced4566c016959784e399de50dd171529bc415..bba734a07b0895133146f65b4a25630115a7d780 100644 (file)
@@ -1582,7 +1582,8 @@ class DebugTransform(CythonTransform):
     def visit_NameNode(self, node):
         if (self.register_stepinto and 
             node.type.is_cfunction and 
-            getattr(node, 'is_called', False)):
+            getattr(node, 'is_called', False) and
+            node.entry.func_cname is not None):
             # don't check node.entry.in_cinclude, as 'cdef extern: ...' 
             # declared functions are not 'in_cinclude'. 
             # This means we will list called 'cdef' functions as