Fix #508
authorDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Sat, 20 Feb 2010 12:36:10 +0000 (13:36 +0100)
committerDag Sverre Seljebotn <dagss@student.matnat.uio.no>
Sat, 20 Feb 2010 12:36:10 +0000 (13:36 +0100)
Cython/Compiler/AnalysedTreeTransforms.py
tests/run/autotestdict.pxd [new file with mode: 0644]

index 300aebbc9b3bd3d8c79073d02329abc37decde64..4ce100f72e781f1b82cd727afc335038872011f8 100644 (file)
@@ -13,6 +13,8 @@ class AutoTestDictTransform(ScopeTrackingTransform):
     blacklist = ['__cinit__', '__dealloc__', '__richcmp__', '__nonzero__']
 
     def visit_ModuleNode(self, node):
+        if node.is_pxd:
+            return node
         self.scope_type = 'module'
         self.scope_node = node
         if self.current_directives['autotestdict']:
diff --git a/tests/run/autotestdict.pxd b/tests/run/autotestdict.pxd
new file mode 100644 (file)
index 0000000..2c4ada8
--- /dev/null
@@ -0,0 +1 @@
+# I just exist