diff options
author | Evan Nemerson <evan@coeus-group.com> | 2013-03-27 02:08:23 -0700 |
---|---|---|
committer | Evan Nemerson <evan@coeus-group.com> | 2013-03-27 02:34:49 -0700 |
commit | fd7ed30beaf863e011196edacef6e894712332f5 (patch) | |
tree | 8d12e13611eaefc5483dd3bad275000ce10120a2 /vapigen/valagidlparser.vala | |
parent | 8c6522886a22de31f274fedd88c61b32c3db4b97 (diff) | |
download | vala-fd7ed30beaf863e011196edacef6e894712332f5.tar.gz |
gtk+-3.0: make IconInfo a compact class instead of a GObject
Fixes bug 695831.
Diffstat (limited to 'vapigen/valagidlparser.vala')
-rw-r--r-- | vapigen/valagidlparser.vala | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/vapigen/valagidlparser.vala b/vapigen/valagidlparser.vala index c707d9f07..a5fc598c2 100644 --- a/vapigen/valagidlparser.vala +++ b/vapigen/valagidlparser.vala @@ -1524,6 +1524,18 @@ public class Vala.GIdlParser : CodeVisitor { if (eval (nv[1]) == "1") { cl.set_attribute ("Experimental", true); } + } else if (nv[0] == "compact") { + if (eval (nv[1]) == "1") { + cl.is_compact = true; + } + } else if (nv[0] == "ref_function") { + cl.set_attribute_string ("CCode", "ref_function", eval (nv[1])); + } else if (nv[0] == "unref_function") { + cl.set_attribute_string ("CCode", "unref_function", eval (nv[1])); + } else if (nv[0] == "copy_function") { + cl.set_attribute_string ("CCode", "copy_function", eval (nv[1])); + } else if (nv[0] == "free_function") { + cl.set_attribute_string ("CCode", "free_function", eval (nv[1])); } } } @@ -1536,8 +1548,10 @@ public class Vala.GIdlParser : CodeVisitor { var parent = parse_type_string (base_class); cl.add_base_type (parent); } else if (node.parent != null) { - var parent = parse_type_string (node.parent); - cl.add_base_type (parent); + if (!cl.is_compact) { + var parent = parse_type_string (node.parent); + cl.add_base_type (parent); + } } else { var gobject_symbol = new UnresolvedSymbol (new UnresolvedSymbol (null, "GLib"), "Object"); cl.add_base_type (new UnresolvedType.from_symbol (gobject_symbol)); |