summaryrefslogtreecommitdiff
path: root/vapigen
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2011-10-29 01:17:16 +0200
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-01-05 20:28:01 +0100
commit9e51169bebe4ec4096ca3a41556e8b7dd916636d (patch)
tree8522665623ee8541623d0a317ee1cfea9e9e1741 /vapigen
parent7aecb7c4e70addfe26c02980962e31d446befb36 (diff)
downloadvala-9e51169bebe4ec4096ca3a41556e8b7dd916636d.tar.gz
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
Diffstat (limited to 'vapigen')
-rw-r--r--vapigen/valagidlparser.vala2
1 files changed, 2 insertions, 0 deletions
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") {