From: Jürg Billeter Date: Mon, 15 Aug 2011 14:12:31 +0000 (+0200) Subject: girparser: Accept function in record, boxed, union, enumeration X-Git-Tag: 0.13.2~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=486ba787cb554b25b7f4564ca824d0b92b0c9b61;p=thirdparty%2Fvala.git girparser: Accept function in record, boxed, union, enumeration Used by gobject-introspection 1.29.17+. This commit ignores the function elements but they could replace our own static method detection in the future. --- diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala index 847efb8cd..c44070574 100644 --- a/vala/valagirparser.vala +++ b/vala/valagirparser.vala @@ -1935,6 +1935,8 @@ public class Vala.GirParser : CodeVisitor { parse_enumeration_member (); calculate_common_prefix (ref common_prefix, old_current.get_cname ()); } + } else if (reader.name == "function") { + skip_element (); } else { // error Report.error (get_current_src (), "unknown child element `%s' in `%s'".printf (reader.name, element_name)); @@ -2304,6 +2306,8 @@ public class Vala.GirParser : CodeVisitor { parse_constructor (); } else if (reader.name == "method") { parse_method ("method"); + } else if (reader.name == "function") { + skip_element (); } else if (reader.name == "union") { parse_union (); } else { @@ -2750,6 +2754,8 @@ public class Vala.GirParser : CodeVisitor { parse_constructor (); } else if (reader.name == "method") { parse_method ("method"); + } else if (reader.name == "function") { + skip_element (); } else if (reader.name == "union") { parse_union (); } else { @@ -2792,6 +2798,8 @@ public class Vala.GirParser : CodeVisitor { parse_constructor (); } else if (reader.name == "method") { parse_method ("method"); + } else if (reader.name == "function") { + skip_element (); } else if (reader.name == "record") { parse_record (); } else {