summaryrefslogtreecommitdiff
path: root/vala/valaenumvalue.vala
diff options
context:
space:
mode:
authorJuerg Billeter <j@bitron.ch>2008-05-10 14:55:38 +0000
committerJürg Billeter <juergbi@src.gnome.org>2008-05-10 14:55:38 +0000
commit6ccf1501ac858ddf0f5ba70f2c213940be3457a8 (patch)
tree4fa5a1164b57755d7b287f559fa10feab64e9a3b /vala/valaenumvalue.vala
parent51fee9d2748295a10c41eee712eaa4dfeb2c8131 (diff)
downloadvala-6ccf1501ac858ddf0f5ba70f2c213940be3457a8.tar.gz
Support cname attribute for enum values, patch by Jared Moore, fixes bug
2008-05-10 Juerg Billeter <j@bitron.ch> * vala/valaattributeprocessor.vala: * vala/valaenumvalue.vala: Support cname attribute for enum values, patch by Jared Moore, fixes bug 529288 svn path=/trunk/; revision=1353
Diffstat (limited to 'vala/valaenumvalue.vala')
-rw-r--r--vala/valaenumvalue.vala12
1 files changed, 12 insertions, 0 deletions
diff --git a/vala/valaenumvalue.vala b/vala/valaenumvalue.vala
index 9bfd3f6d8..7ba730687 100644
--- a/vala/valaenumvalue.vala
+++ b/vala/valaenumvalue.vala
@@ -95,6 +95,18 @@ public class Vala.EnumValue : Symbol {
}
/**
+ * Process all associated attributes.
+ */
+ public void process_attributes () {
+ foreach (Attribute a in attributes) {
+ if (a.name == "CCode" && a.has_argument("cname")) {
+ cname = a.get_string ("cname");
+ }
+ }
+ }
+
+
+ /**
* Returns the name of this enum value as it is used in C code.
*
* @return the name to be used in C code