[vala/switch-to-gir] girparser: Add missing source references when creating types



commit bc76c45c6f87955917ef72b2a0c3b193799529b9
Author: Luca Bruno <lethalman88 gmail com>
Date:   Tue Aug 24 13:59:23 2010 +0200

    girparser: Add missing source references when creating types

 vala/valagirparser.vala |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 5bcacbd..40c7895 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -605,11 +605,11 @@ public class Vala.GirParser : CodeVisitor {
 	DataType parse_type_from_name (string type_name) {
 		DataType type;
 		if (type_name == "none") {
-			type = new VoidType ();
+			type = new VoidType (get_current_src ());
 		} else if (type_name == "any") {
-			type = new PointerType (new VoidType ());
+			type = new PointerType (new VoidType (get_current_src ()), get_current_src ());
 		} else if (type_name == "GObject.Strv") {
-			type = new ArrayType (new UnresolvedType.from_symbol (new UnresolvedSymbol (null, "string")), 1, null);
+			type = new ArrayType (new UnresolvedType.from_symbol (new UnresolvedSymbol (null, "string")), 1, get_current_src ());
 		} else {
 			if (type_name == "utf8") {
 				type_name = "string";
@@ -637,10 +637,10 @@ public class Vala.GirParser : CodeVisitor {
 				// namespaced name
 				string namespace_component = type_components[0];
 				string type_component = type_components[1];
-				type = new UnresolvedType.from_symbol (new UnresolvedSymbol (new UnresolvedSymbol (null, namespace_component), type_component));
+				type = new UnresolvedType.from_symbol (new UnresolvedSymbol (new UnresolvedSymbol (null, namespace_component), type_component, get_current_src ()), get_current_src ());
 				unresolved_namespaced_types.add ((UnresolvedType) type);
 			} else {
-				type = new UnresolvedType.from_symbol (new UnresolvedSymbol (null, type_name));
+				type = new UnresolvedType.from_symbol (new UnresolvedSymbol (null, type_name, get_current_src ()), get_current_src ());
 			}
 		}
 



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