summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2011-05-05 17:57:33 +0200
committerChristophe Fergeau <cfergeau@redhat.com>2011-05-23 18:16:49 +0200
commitb827c4b81366ebc749594d4b194a62258c6140e5 (patch)
tree2b786de0e9a1435a031540891d6d02b894920cc0
parentf89c9bf63855b2c7eb832e5d6abf3d23d654ccf8 (diff)
fix copy & paste error in ptypes.py
-rw-r--r--python_modules/ptypes.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py
index 0ae57ec..a99a57a 100644
--- a/python_modules/ptypes.py
+++ b/python_modules/ptypes.py
@@ -234,13 +234,11 @@ class EnumBaseType(Type):
return codegen.prefix_camel(self.name)
def c_enumname(self, value):
- if self.has_attr("prefix"):
- return self.attributes["prefix"][0] + self.names[value]
- return codegen.prefix_underscore_upper(self.name.upper(), self.names[value])
+ self.c_enumname_by_name(self.names[value])
def c_enumname_by_name(self, name):
if self.has_attr("prefix"):
- return self.attributes["prefix"][0] + self.names[value]
+ return self.attributes["prefix"][0] + name
return codegen.prefix_underscore_upper(self.name.upper(), name)
def is_primitive(self):