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
2008-05-10 Jürg Billeter <j@bitron.ch>
+ * vala/valaattributeprocessor.vala:
+ * vala/valaenumvalue.vala:
+
+ Support cname attribute for enum values,
+ patch by Jared Moore, fixes bug 529288
+
+2008-05-10 Jürg Billeter <j@bitron.ch>
+
* vapi/packages/gtk+-2.0/:
Fix gtk_dialog_new_with_buttons and gtk_file_chooser_dialog_new*
public override void visit_enum (Enum en) {
en.process_attributes ();
+
+ en.accept_children (this);
+ }
+
+ public override void visit_enum_value (EnumValue ev) {
+ ev.process_attributes ();
}
public override void visit_error_domain (ErrorDomain edomain) {
}
/**
+ * 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