diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2011-10-29 01:17:16 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-01-05 20:28:01 +0100 |
commit | 9e51169bebe4ec4096ca3a41556e8b7dd916636d (patch) | |
tree | 8522665623ee8541623d0a317ee1cfea9e9e1741 /vapigen | |
parent | 7aecb7c4e70addfe26c02980962e31d446befb36 (diff) | |
download | vala-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.vala | 2 |
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") { |