From: Marc-André Lureau Date: Fri, 28 Oct 2011 23:17:16 +0000 (+0200) Subject: gidl parse default_value for enums X-Git-Tag: 0.14.2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a4e7419583114921fbaaab634ceb80959b2e0d2;p=thirdparty%2Fvala.git gidl parse default_value for enums It can be useful for correct default value in properties https://bugzilla.gnome.org/show_bug.cgi?id=662974 --- diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index 66141dd68..f93784df0 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -1391,6 +1391,8 @@ public class Vala.GIdlParser : CodeVisitor { if (eval (nv[1]) == "1") { en.set_attribute ("Deprecated", true); } + } else if (nv[0] == "default_value") { + en.set_attribute_string ("CCode", "default_value", eval (nv[1])); } else if (nv[0] == "replacement") { en.set_attribute_string ("Deprecated", "replacement", eval (nv[1])); } else if (nv[0] == "deprecated_since") {