Default 'is_called' attribute to False if not set in DebugTransform
authorMark Florisson <markflorisson88@gmail.com>
Fri, 5 Nov 2010 20:50:20 +0000 (21:50 +0100)
committerMark Florisson <markflorisson88@gmail.com>
Fri, 5 Nov 2010 20:50:20 +0000 (21:50 +0100)
Cython/Compiler/ParseTreeTransforms.py

index 67bdf9c4926b46b929b4949ab57fb15f62bf7595..bc3514b3113f97dc4454e998e28047f6a6988f6b 100644 (file)
@@ -1554,7 +1554,9 @@ class DebugTransform(CythonTransform):
         return node
 
     def visit_NameNode(self, node):
-        if (self.register_stepinto and node.type.is_cfunction and node.is_called):
+        if (self.register_stepinto and 
+            node.type.is_cfunction and 
+            getattr(node, 'is_called', False)):
             # 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