Attempt to fix public enum values not being exported.
authorGrant Baillie <grant@osafoundation.org>
Fri, 28 Aug 2009 01:57:13 +0000 (18:57 -0700)
committerGrant Baillie <grant@osafoundation.org>
Fri, 28 Aug 2009 01:57:13 +0000 (18:57 -0700)
Cython/Compiler/ParseTreeTransforms.py
tests/run/public_enum.pyx [new file with mode: 0644]

index 36200d7414c8ffe72c07f014add32d70f22eb4a8..ccc3129ea6d66baf03aeb35410fb05dc2512be98 100644 (file)
@@ -677,7 +677,10 @@ property NAME:
         return None
     
     def visit_CEnumDefNode(self, node):
-        return None
+        if node.visibility == 'public':
+            return node
+        else:
+            return None
 
     def visit_CStructOrUnionDefNode(self, node):
         return None
diff --git a/tests/run/public_enum.pyx b/tests/run/public_enum.pyx
new file mode 100644 (file)
index 0000000..f437aab
--- /dev/null
@@ -0,0 +1,7 @@
+__doc__ = u"""
+>>> BAR
+3
+"""
+
+cdef public enum FOO:
+    BAR = 3