From da14f38be849274da7009ea35e72fd38c0acf16d Mon Sep 17 00:00:00 2001 From: Dag Sverre Seljebotn Date: Sat, 20 Feb 2010 13:36:10 +0100 Subject: [PATCH] Fix #508 --- Cython/Compiler/AnalysedTreeTransforms.py | 2 ++ tests/run/autotestdict.pxd | 1 + 2 files changed, 3 insertions(+) create mode 100644 tests/run/autotestdict.pxd diff --git a/Cython/Compiler/AnalysedTreeTransforms.py b/Cython/Compiler/AnalysedTreeTransforms.py index 300aebbc..4ce100f7 100644 --- a/Cython/Compiler/AnalysedTreeTransforms.py +++ b/Cython/Compiler/AnalysedTreeTransforms.py @@ -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 index 00000000..2c4ada8b --- /dev/null +++ b/tests/run/autotestdict.pxd @@ -0,0 +1 @@ +# I just exist -- 2.26.2