From: Grant Baillie Date: Fri, 28 Aug 2009 01:57:13 +0000 (-0700) Subject: Attempt to fix public enum values not being exported. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9a1592760ece131c3d0795477e7c85d62df5b960;p=cython.git Attempt to fix public enum values not being exported. --- diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py index 36200d74..ccc3129e 100644 --- a/Cython/Compiler/ParseTreeTransforms.py +++ b/Cython/Compiler/ParseTreeTransforms.py @@ -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 index 00000000..f437aab3 --- /dev/null +++ b/tests/run/public_enum.pyx @@ -0,0 +1,7 @@ +__doc__ = u""" +>>> BAR +3 +""" + +cdef public enum FOO: + BAR = 3