Commit 78881f8b authored by Jason Evans's avatar Jason Evans

Do not mangle enum constant names if the enum is public.

parent 5da90229
...@@ -303,7 +303,7 @@ class Scope: ...@@ -303,7 +303,7 @@ class Scope:
def declare_const(self, name, type, value, pos, cname = None, visibility = 'private'): def declare_const(self, name, type, value, pos, cname = None, visibility = 'private'):
# Add an entry for a named constant. # Add an entry for a named constant.
if not cname: if not cname:
if self.in_cinclude: if self.in_cinclude or visibility == 'public':
cname = name cname = name
else: else:
cname = self.mangle(Naming.enum_prefix, name) cname = self.mangle(Naming.enum_prefix, name)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment