From: Jason Evans Date: Sat, 17 Jan 2009 05:03:02 +0000 (-0800) Subject: Do not mangle enum constant names if the enum is public. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=78881f8bdac6bb02d87fdec50d32f8c67d470702;p=cython.git Do not mangle enum constant names if the enum is public. --- diff --git a/Cython/Compiler/Symtab.py b/Cython/Compiler/Symtab.py index bdefe2a6..ed8584d6 100644 --- a/Cython/Compiler/Symtab.py +++ b/Cython/Compiler/Symtab.py @@ -303,7 +303,7 @@ class Scope: def declare_const(self, name, type, value, pos, cname = None, visibility = 'private'): # Add an entry for a named constant. if not cname: - if self.in_cinclude: + if self.in_cinclude or visibility == 'public': cname = name else: cname = self.mangle(Naming.enum_prefix, name)