Do not mangle enum constant names if the enum is public.
authorJason Evans <jasone@canonware.com>
Sat, 17 Jan 2009 05:03:02 +0000 (21:03 -0800)
committerJason Evans <jasone@canonware.com>
Sat, 17 Jan 2009 05:03:02 +0000 (21:03 -0800)
Cython/Compiler/Symtab.py

index bdefe2a69169ff372db7af1f839d81be53caf76c..ed8584d6d593bf4eec5cafcea80641d1fcf8226f 100644 (file)
@@ -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)