[vala] girparser: allow setting base_type of boxed types in metadata



commit 72d929658d71e85895d2e323578f5061c88992e1
Author: Evan Nemerson <evan coeus-group com>
Date:   Tue Jun 12 11:48:55 2012 -0700

    girparser: allow setting base_type of boxed types in metadata
    
    Fixes bug 677906.

 vala/valagirparser.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 902870d..cade19e 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -70,7 +70,8 @@ public class Vala.GirParser : CodeVisitor {
 		CPREFIX,
 		LOWER_CASE_CPREFIX,
 		ERRORDOMAIN,
-		DESTROYS_INSTANCE;
+		DESTROYS_INSTANCE,
+		BASE_TYPE;
 
 		public static ArgumentType? from_string (string name) {
 			var enum_class = (EnumClass) typeof(ArgumentType).class_ref ();
@@ -2902,6 +2903,10 @@ public class Vala.GirParser : CodeVisitor {
 		cl.access = SymbolAccessibility.PUBLIC;
 		cl.external = true;
 
+		if (metadata.has_argument (ArgumentType.BASE_TYPE)) {
+			cl.add_base_type (parse_type_from_string (metadata.get_string (ArgumentType.BASE_TYPE), true, metadata.get_source_reference (ArgumentType.BASE_TYPE)));
+		}
+
 		next ();
 
 		cl.comment = parse_symbol_doc ();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]