[valadoc] Api: Remove references to the tree root in nodes



commit e8890f073fc2113ec027ffbdb832d9bdad37df76
Author: Didier 'Ptitjes <ptitjes free fr>
Date:   Wed Oct 14 15:39:43 2009 +0200

    Api: Remove references to the tree root in nodes

 src/libvaladoc/apitree/apiitem.vala              |    8 +-----
 src/libvaladoc/apitree/apimembernode.vala        |    4 +-
 src/libvaladoc/apitree/apinode.vala              |    7 ++---
 src/libvaladoc/apitree/apinodebuilder.vala       |   30 +++++++++++-----------
 src/libvaladoc/apitree/apisymbolnode.vala        |    4 +-
 src/libvaladoc/apitree/apitree.vala              |    8 +++---
 src/libvaladoc/apitree/apitypesymbolnode.vala    |    4 +-
 src/libvaladoc/apitree/array.vala                |   15 +++++------
 src/libvaladoc/apitree/class.vala                |   14 +++++-----
 src/libvaladoc/apitree/constant.vala             |    8 +++---
 src/libvaladoc/apitree/delegate.vala             |   10 +++---
 src/libvaladoc/apitree/enum.vala                 |    4 +-
 src/libvaladoc/apitree/enumhandler.vala          |    2 +-
 src/libvaladoc/apitree/enumvalue.vala            |    4 +-
 src/libvaladoc/apitree/errorcode.vala            |    4 +-
 src/libvaladoc/apitree/errordomain.vala          |    4 +-
 src/libvaladoc/apitree/exceptionlisthandler.vala |    4 +-
 src/libvaladoc/apitree/field.vala                |   10 +++---
 src/libvaladoc/apitree/formalparameter.vala      |   10 +++---
 src/libvaladoc/apitree/interface.vala            |   16 ++++++------
 src/libvaladoc/apitree/method.vala               |   14 +++++-----
 src/libvaladoc/apitree/namespace.vala            |    4 +-
 src/libvaladoc/apitree/namespacehandler.vala     |    4 +-
 src/libvaladoc/apitree/package.vala              |    8 +++---
 src/libvaladoc/apitree/pointer.vala              |   17 ++++++------
 src/libvaladoc/apitree/property.vala             |   14 +++++-----
 src/libvaladoc/apitree/propertyaccessor.vala     |    4 +-
 src/libvaladoc/apitree/returntypehandler.vala    |    6 ++--
 src/libvaladoc/apitree/signal.vala               |   10 +++---
 src/libvaladoc/apitree/struct.vala               |   16 ++++++------
 src/libvaladoc/apitree/typeparameter.vala        |    4 +-
 src/libvaladoc/apitree/typereference.vala        |   29 ++++++++++-----------
 32 files changed, 145 insertions(+), 155 deletions(-)
---
diff --git a/src/libvaladoc/apitree/apiitem.vala b/src/libvaladoc/apitree/apiitem.vala
index 3121019..27a4890 100644
--- a/src/libvaladoc/apitree/apiitem.vala
+++ b/src/libvaladoc/apitree/apiitem.vala
@@ -34,13 +34,7 @@ public abstract class Valadoc.Api.Item : Object {
 		get;
 	}
 
-	// TODO rename root
-	public Tree head {
-		protected set;
-		get;
-	}
-
-	protected virtual void resolve_type_references () {
+	protected virtual void resolve_type_references (Tree root) {
 	}
 
 	protected virtual void parse_comments (DocumentationParser parser) {
diff --git a/src/libvaladoc/apitree/apimembernode.vala b/src/libvaladoc/apitree/apimembernode.vala
index 4b8aa64..ea5b201 100644
--- a/src/libvaladoc/apitree/apimembernode.vala
+++ b/src/libvaladoc/apitree/apimembernode.vala
@@ -26,8 +26,8 @@ using Gee;
 
 public abstract class Valadoc.Api.MemberNode : Api.SymbolNode {
 
-	public MemberNode (Settings settings, Vala.Member symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public MemberNode (Settings settings, Vala.Member symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 	}
 
 	protected override void parse_comments (DocumentationParser parser) {
diff --git a/src/libvaladoc/apitree/apinode.vala b/src/libvaladoc/apitree/apinode.vala
index 825d43a..94af777 100644
--- a/src/libvaladoc/apitree/apinode.vala
+++ b/src/libvaladoc/apitree/apinode.vala
@@ -58,10 +58,9 @@ public abstract class Valadoc.Api.Node : /*Api.Item*/DocumentedElement, Visitabl
 	private Map<Symbol,Node> per_symbol_children;
 	private Map<NodeType?,Gee.List<Node>> per_type_children;
 
-	public Node (Settings settings, Api.Node? parent, Tree root) {
+	public Node (Settings settings, Api.Node? parent) {
 		this.settings = settings;
 		this.parent = parent;
-		this.head = root;
 
 		per_name_children = new HashMap<string,Node> ();
 		per_symbol_children = new HashMap<Symbol,Node> ();
@@ -97,9 +96,9 @@ public abstract class Valadoc.Api.Node : /*Api.Item*/DocumentedElement, Visitabl
 		children.add (child);
 	}
 
-	protected override void resolve_type_references () {
+	protected override void resolve_type_references (Tree root) {
 		foreach (Node node in per_name_children.values) {
-			node.resolve_type_references ();
+			node.resolve_type_references (root);
 		}
 	}
 
diff --git a/src/libvaladoc/apitree/apinodebuilder.vala b/src/libvaladoc/apitree/apinodebuilder.vala
index 5355fa1..75e9791 100644
--- a/src/libvaladoc/apitree/apinodebuilder.vala
+++ b/src/libvaladoc/apitree/apinodebuilder.vala
@@ -70,7 +70,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_class (Vala.Class element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new Class (settings, element, parent, root);
+		SymbolNode node = new Class (settings, element, parent);
 		parent.add_child (node);
 
 		process_children (node, element);
@@ -79,7 +79,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_interface (Vala.Interface element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new Interface (settings, element, parent, root);
+		SymbolNode node = new Interface (settings, element, parent);
 		parent.add_child (node);
 
 		process_children (node, element);
@@ -88,7 +88,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_struct (Vala.Struct element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new Struct (settings, element, parent, root);
+		SymbolNode node = new Struct (settings, element, parent);
 		parent.add_child (node);
 
 		process_children (node, element);
@@ -97,7 +97,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_field (Vala.Field element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new Field (settings, element, parent, root);
+		SymbolNode node = new Field (settings, element, parent);
 		parent.add_child (node);
 
 		// Process field type
@@ -108,7 +108,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_property (Vala.Property element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new Property (settings, element, parent, root);
+		SymbolNode node = new Property (settings, element, parent);
 		parent.add_child (node);
 
 		// Process property type
@@ -119,7 +119,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_method (Vala.Method element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new Method (settings, element, parent, root);
+		SymbolNode node = new Method (settings, element, parent);
 		parent.add_child (node);
 
 		// Process error types
@@ -131,7 +131,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_signal (Vala.Signal element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new Signal (settings, element, parent, root);
+		SymbolNode node = new Signal (settings, element, parent);
 		parent.add_child (node);
 
 		// Process return type
@@ -142,7 +142,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_delegate (Vala.Delegate element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new Delegate (settings, element, parent, root);
+		SymbolNode node = new Delegate (settings, element, parent);
 		parent.add_child (node);
 
 		// Process error types
@@ -154,7 +154,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_enum (Vala.Enum element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new Enum (settings, element, parent, root);
+		SymbolNode node = new Enum (settings, element, parent);
 		parent.add_child (node);
 
 		process_children (node, element);
@@ -163,7 +163,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_enum_value (Vala.EnumValue element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new EnumValue (settings, element, parent, root);
+		SymbolNode node = new EnumValue (settings, element, parent);
 		parent.add_child (node);
 
 		process_children (node, element);
@@ -172,7 +172,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_constant (Vala.Constant element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new Constant (settings, element, parent, root);
+		SymbolNode node = new Constant (settings, element, parent);
 		parent.add_child (node);
 
 		process_children (node, element);
@@ -181,7 +181,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_error_domain (Vala.ErrorDomain element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new ErrorDomain (settings, element, parent, root);
+		SymbolNode node = new ErrorDomain (settings, element, parent);
 		parent.add_child (node);
 
 		process_children (node, element);
@@ -190,7 +190,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_error_code (Vala.ErrorCode element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new ErrorCode (settings, element, parent, root);
+		SymbolNode node = new ErrorCode (settings, element, parent);
 		parent.add_child (node);
 
 		process_children (node, element);
@@ -199,7 +199,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_type_parameter (Vala.TypeParameter element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new TypeParameter (settings, element, parent, root);
+		SymbolNode node = new TypeParameter (settings, element, parent);
 		parent.add_child (node);
 
 		process_children (node, element);
@@ -208,7 +208,7 @@ internal class Valadoc.Api.NodeBuilder : CodeVisitor {
 	public override void visit_formal_parameter (Vala.FormalParameter element) {
 		Node parent = get_parent_node_for (element);
 
-		SymbolNode node = new FormalParameter (settings, element, parent, root);
+		SymbolNode node = new FormalParameter (settings, element, parent);
 		parent.add_child (node);
 
 		process_children (node, element);
diff --git a/src/libvaladoc/apitree/apisymbolnode.vala b/src/libvaladoc/apitree/apisymbolnode.vala
index f6d7061..d46aa55 100644
--- a/src/libvaladoc/apitree/apisymbolnode.vala
+++ b/src/libvaladoc/apitree/apisymbolnode.vala
@@ -36,8 +36,8 @@ public abstract class Valadoc.Api.SymbolNode : Api.Node, SymbolAccessibility {
 		}
 	}
 
-	public SymbolNode (Settings settings, Vala.Symbol symbol, Api.Node parent, Tree root) {
-		base (settings, parent, root);
+	public SymbolNode (Settings settings, Vala.Symbol symbol, Api.Node parent) {
+		base (settings, parent);
 		this.symbol = symbol;
 	}
 
diff --git a/src/libvaladoc/apitree/apitree.vala b/src/libvaladoc/apitree/apitree.vala
index bf349a6..ed7fe4d 100644
--- a/src/libvaladoc/apitree/apitree.vala
+++ b/src/libvaladoc/apitree/apitree.vala
@@ -186,7 +186,7 @@ public class Valadoc.Tree {
 		var vfile = new SourceFile (context, package_path, true);
 		context.add_source_file (vfile);
 
-		Package vdpkg = new Package (this.settings, vfile, this, true);
+		Package vdpkg = new Package (this.settings, vfile, true);
 		this.packages.add (vdpkg);
 
 		var deps_filename = Path.build_filename (Path.get_dirname (package_path), "%s.deps".printf (pkg));
@@ -233,7 +233,7 @@ public class Valadoc.Tree {
 
 
 					if (this.sourcefiles == null) {
-						this.sourcefiles = new Package (this.settings, source_file, this, false);
+						this.sourcefiles = new Package (this.settings, source_file, false);
 						this.packages.add (this.sourcefiles);
 					}
 					else {
@@ -255,7 +255,7 @@ public class Valadoc.Tree {
 					context.add_source_file (source_file);
 				} else if (source.has_suffix (".vapi")) {
 					var vfile = new SourceFile (context, rpath, true);
-					Package vdpkg = new Package (this.settings, vfile, this); 
+					Package vdpkg = new Package (this.settings, vfile); 
 					context.add_source_file (vfile);
 					this.packages.add (vdpkg);
 				} else if (source.has_suffix (".c")) {
@@ -314,7 +314,7 @@ public class Valadoc.Tree {
 
 	private void resolve_type_references () {
 		foreach (Package pkg in this.packages) {
-			pkg.resolve_type_references();
+			pkg.resolve_type_references (this);
 		}
 	}
 
diff --git a/src/libvaladoc/apitree/apitypesymbolnode.vala b/src/libvaladoc/apitree/apitypesymbolnode.vala
index 149f173..cfb74c7 100644
--- a/src/libvaladoc/apitree/apitypesymbolnode.vala
+++ b/src/libvaladoc/apitree/apitypesymbolnode.vala
@@ -26,8 +26,8 @@ using Gee;
 
 public abstract class Valadoc.Api.TypeSymbolNode : Api.SymbolNode {
 
-	public TypeSymbolNode (Settings settings, Vala.TypeSymbol symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public TypeSymbolNode (Settings settings, Vala.TypeSymbol symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 	}
 
 	protected override void parse_comments (DocumentationParser parser) {
diff --git a/src/libvaladoc/apitree/array.vala b/src/libvaladoc/apitree/array.vala
index fdc1c60..1ef8ba5 100644
--- a/src/libvaladoc/apitree/array.vala
+++ b/src/libvaladoc/apitree/array.vala
@@ -31,32 +31,31 @@ public class Valadoc.Array : Basic {
 		get;
 	}
 
-	public Array (Valadoc.Settings settings, Vala.ArrayType vtyperef, Basic parent, Tree head) {
+	public Array (Valadoc.Settings settings, Vala.ArrayType vtyperef, Basic parent) {
 		this.settings = settings;
 		this.vtype = vtyperef;
 		this.parent = parent;
-		this.head = head;
 
 		Vala.DataType vntype = vtyperef.element_type;
 		if ( vntype is Vala.ArrayType )
-			this.data_type = new Array (settings, (Vala.ArrayType)vntype, this, head);
+			this.data_type = new Array (settings, (Vala.ArrayType)vntype, this);
 		else
-			this.data_type = new TypeReference (settings, vntype, this, head);
+			this.data_type = new TypeReference (settings, vntype, this);
 	}
 
 	public void write (Langlet langlet, void* ptr, DocumentedElement parent) {
 		langlet.write_array (this, ptr, parent);
 	}
 
-	public void set_type_references () {
+	protected override void resolve_type_references (Tree root) {
 		if ( this.data_type == null )
 			/*TODO:possible?*/;
 		else if ( this.data_type is Array )
-			((Array)this.data_type).resolve_type_references ();
+			((Array)this.data_type).resolve_type_references (root);
 		else if ( this.data_type is Pointer )
-			((Pointer)this.data_type).resolve_type_references ();
+			((Pointer)this.data_type).resolve_type_references (root);
 		else
-			((TypeReference)this.data_type).resolve_type_references ();
+			((TypeReference)this.data_type).resolve_type_references (root);
 	}
 }
 
diff --git a/src/libvaladoc/apitree/class.vala b/src/libvaladoc/apitree/class.vala
index 5119c6c..62dd708 100644
--- a/src/libvaladoc/apitree/class.vala
+++ b/src/libvaladoc/apitree/class.vala
@@ -27,8 +27,8 @@ public class Valadoc.Class : Api.TypeSymbolNode, ClassHandler, StructHandler, Si
 	private Gee.ArrayList<Interface> interfaces;
 	private Vala.Class vclass;
 
-	public Class (Valadoc.Settings settings, Vala.Class symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Class (Valadoc.Settings settings, Vala.Class symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.interfaces = new Gee.ArrayList<Interface>();
 
 		this.vclass = symbol;
@@ -80,12 +80,12 @@ public class Valadoc.Class : Api.TypeSymbolNode, ClassHandler, StructHandler, Si
 		visit (doclet);
 	}
 
-	private void set_parent_type_references ( Gee.Collection<Vala.DataType> lst ) {
+	private void set_parent_type_references (Tree root, Gee.Collection<Vala.DataType> lst) {
 		if (this.interfaces.size != 0)
 			return ;
 
 		foreach ( Vala.DataType vtyperef in lst ) {
-			Basic? element = this.head.search_vala_symbol ( vtyperef.data_type );
+			Basic? element = root.search_vala_symbol ( vtyperef.data_type );
 			if ( element is Class ) {
 				this.base_type = (Class)element;
 			}
@@ -95,11 +95,11 @@ public class Valadoc.Class : Api.TypeSymbolNode, ClassHandler, StructHandler, Si
 		}
 	}
 
-	protected override void resolve_type_references () {
+	protected override void resolve_type_references (Tree root) {
 		var lst = this.vclass.get_base_types ();
-		this.set_parent_type_references ( lst );
+		this.set_parent_type_references (root, lst);
 
-		base.resolve_type_references ( );
+		base.resolve_type_references (root);
 	}
 }
 
diff --git a/src/libvaladoc/apitree/constant.vala b/src/libvaladoc/apitree/constant.vala
index cf6f873..90e0b33 100644
--- a/src/libvaladoc/apitree/constant.vala
+++ b/src/libvaladoc/apitree/constant.vala
@@ -35,8 +35,8 @@ public class Valadoc.Constant : Api.MemberNode, ReturnTypeHandler {
 		return ( this.vconst == vconst );
 	}
 
-	public Constant (Valadoc.Settings settings, Vala.Constant symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Constant (Valadoc.Settings settings, Vala.Constant symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.vconst = symbol;
 
 		var vret = this.vconst.type_reference;
@@ -47,8 +47,8 @@ public class Valadoc.Constant : Api.MemberNode, ReturnTypeHandler {
 		return this.vconst.get_cname ();
 	}
 
-	protected override void resolve_type_references () {
-		this.set_return_type_references ( );
+	protected override void resolve_type_references (Tree root) {
+		this.set_return_type_references (root);
 	}
 
 	public void visit ( Doclet doclet, ConstantHandler? parent ) {
diff --git a/src/libvaladoc/apitree/delegate.vala b/src/libvaladoc/apitree/delegate.vala
index 445d526..a1fdd4b 100644
--- a/src/libvaladoc/apitree/delegate.vala
+++ b/src/libvaladoc/apitree/delegate.vala
@@ -26,8 +26,8 @@ using Gee;
 public class Valadoc.Delegate : Api.TypeSymbolNode, ParameterListHandler, ReturnTypeHandler, TemplateParameterListHandler, ExceptionHandler {
 	private Vala.Delegate vdelegate;
 
-	public Delegate (Valadoc.Settings settings, Vala.Delegate symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Delegate (Valadoc.Settings settings, Vala.Delegate symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 
 		this.vdelegate = symbol;
 
@@ -63,11 +63,11 @@ public class Valadoc.Delegate : Api.TypeSymbolNode, ParameterListHandler, Return
 		}
 	}
 
-	protected override void resolve_type_references () {
-		this.set_return_type_references ( );
+	protected override void resolve_type_references (Tree root) {
+		this.set_return_type_references (root);
 
 		var vexceptionlst = this.vdelegate.get_error_types ();
-		this.add_exception_list ( vexceptionlst );
+		this.add_exception_list (root, vexceptionlst);
 	}
 
 	public void write (Langlet langlet, void* ptr) {
diff --git a/src/libvaladoc/apitree/enum.vala b/src/libvaladoc/apitree/enum.vala
index 2d669b7..33ef053 100644
--- a/src/libvaladoc/apitree/enum.vala
+++ b/src/libvaladoc/apitree/enum.vala
@@ -24,8 +24,8 @@ using Gee;
 
 
 public class Valadoc.Enum : Api.TypeSymbolNode, MethodHandler {
-	public Enum (Valadoc.Settings settings, Vala.Enum symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Enum (Valadoc.Settings settings, Vala.Enum symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.venum = symbol;
 	}
 
diff --git a/src/libvaladoc/apitree/enumhandler.vala b/src/libvaladoc/apitree/enumhandler.vala
index 89bd17e..48f9501 100644
--- a/src/libvaladoc/apitree/enumhandler.vala
+++ b/src/libvaladoc/apitree/enumhandler.vala
@@ -37,7 +37,7 @@ public interface Valadoc.EnumHandler : Api.Node {
 	}
 
 	public void add_enum ( Vala.Enum venum ) {
-		Enum tmp = new Enum ( this.settings, venum, this, this.head );
+		Enum tmp = new Enum (this.settings, venum, this);
 		add_child (tmp);
 	}
 }
diff --git a/src/libvaladoc/apitree/enumvalue.vala b/src/libvaladoc/apitree/enumvalue.vala
index ff22634..3a440ee 100644
--- a/src/libvaladoc/apitree/enumvalue.vala
+++ b/src/libvaladoc/apitree/enumvalue.vala
@@ -26,8 +26,8 @@ using Gee;
 public class Valadoc.EnumValue: Api.SymbolNode {
 	private Vala.EnumValue venval;
 
-	public EnumValue (Valadoc.Settings settings, Vala.EnumValue symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public EnumValue (Valadoc.Settings settings, Vala.EnumValue symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.venval = symbol;
 	}
 
diff --git a/src/libvaladoc/apitree/errorcode.vala b/src/libvaladoc/apitree/errorcode.vala
index d0fa8a0..a493cf6 100644
--- a/src/libvaladoc/apitree/errorcode.vala
+++ b/src/libvaladoc/apitree/errorcode.vala
@@ -26,8 +26,8 @@ using Gee;
 public class Valadoc.ErrorCode : Api.TypeSymbolNode {
 	private Vala.ErrorCode verrcode;
 
-	public ErrorCode (Valadoc.Settings settings, Vala.ErrorCode symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public ErrorCode (Valadoc.Settings settings, Vala.ErrorCode symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.verrcode = symbol;
 	}
 
diff --git a/src/libvaladoc/apitree/errordomain.vala b/src/libvaladoc/apitree/errordomain.vala
index af4fc5b..920a793 100644
--- a/src/libvaladoc/apitree/errordomain.vala
+++ b/src/libvaladoc/apitree/errordomain.vala
@@ -24,8 +24,8 @@ using Gee;
 public class Valadoc.ErrorDomain : Api.TypeSymbolNode, MethodHandler {
 	private Vala.ErrorDomain verrdom;
 
-	public ErrorDomain (Valadoc.Settings settings, Vala.ErrorDomain symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public ErrorDomain (Valadoc.Settings settings, Vala.ErrorDomain symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.verrdom = symbol;
 	}
 
diff --git a/src/libvaladoc/apitree/exceptionlisthandler.vala b/src/libvaladoc/apitree/exceptionlisthandler.vala
index 71736d4..936278b 100644
--- a/src/libvaladoc/apitree/exceptionlisthandler.vala
+++ b/src/libvaladoc/apitree/exceptionlisthandler.vala
@@ -28,12 +28,12 @@ public interface Valadoc.ExceptionHandler : Api.Node {
 		return get_children_by_type (Api.NodeType.ERROR_DOMAIN);
 	}
 
-	public void add_exception_list (Gee.Collection<Vala.DataType> vexceptions) {
+	public void add_exception_list (Tree root, Gee.Collection<Vala.DataType> vexceptions) {
 		foreach (Vala.DataType vtype in vexceptions) {
 			if (((Vala.ErrorType) vtype).error_domain == null) {
 				add_child ( glib_error );
 			} else {
-				ErrorDomain type = (ErrorDomain) this.head.search_vala_symbol (((Vala.ErrorType) vtype).error_domain);
+				ErrorDomain type = (ErrorDomain) root.search_vala_symbol (((Vala.ErrorType) vtype).error_domain);
 				add_child (type);
 			}
 		}
diff --git a/src/libvaladoc/apitree/field.vala b/src/libvaladoc/apitree/field.vala
index cdfaf29..df97a50 100644
--- a/src/libvaladoc/apitree/field.vala
+++ b/src/libvaladoc/apitree/field.vala
@@ -26,8 +26,8 @@ using Gee;
 public class Valadoc.Field : Api.MemberNode, ReturnTypeHandler {
 	private Vala.Field vfield;
 
-	public Field (Valadoc.Settings settings, Vala.Field symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Field (Valadoc.Settings settings, Vala.Field symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.vfield = symbol;
 
 		var vret = this.vfield.field_type;
@@ -58,10 +58,10 @@ public class Valadoc.Field : Api.MemberNode, ReturnTypeHandler {
 		}
 	}
 
-	protected override void resolve_type_references () {
-		this.set_return_type_references ();
+	protected override void resolve_type_references (Tree root) {
+		this.set_return_type_references (root);
 
-		base.resolve_type_references ();
+		base.resolve_type_references (root);
 	}
 
 	public void visit ( Doclet doclet, FieldHandler? parent ) {
diff --git a/src/libvaladoc/apitree/formalparameter.vala b/src/libvaladoc/apitree/formalparameter.vala
index 4ac9d83..3239e45 100644
--- a/src/libvaladoc/apitree/formalparameter.vala
+++ b/src/libvaladoc/apitree/formalparameter.vala
@@ -24,8 +24,8 @@ using Gee;
 public class Valadoc.FormalParameter : Api.SymbolNode, ReturnTypeHandler {
 	private Vala.FormalParameter vformalparam;
 
-	public FormalParameter (Valadoc.Settings settings, Vala.FormalParameter symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public FormalParameter (Valadoc.Settings settings, Vala.FormalParameter symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.vformalparam = symbol;
 
 		var vformparam = this.vformalparam.parameter_type;
@@ -66,13 +66,13 @@ public class Valadoc.FormalParameter : Api.SymbolNode, ReturnTypeHandler {
 	public override void accept (Doclet doclet) {
 	}
 
-	protected override void resolve_type_references () {
+	protected override void resolve_type_references (Tree root) {
 		if (this.vformalparam.ellipsis)
 			return ;
 
-		this.set_return_type_references ();
+		this.set_return_type_references (root);
 
-		base.resolve_type_references ();
+		base.resolve_type_references (root);
 	}
 
 	public void write ( Langlet langlet, void* ptr ) {
diff --git a/src/libvaladoc/apitree/interface.vala b/src/libvaladoc/apitree/interface.vala
index 43f90a8..2ad85ca 100644
--- a/src/libvaladoc/apitree/interface.vala
+++ b/src/libvaladoc/apitree/interface.vala
@@ -24,8 +24,8 @@ using Gee;
 
 
 public class Valadoc.Interface : Api.TypeSymbolNode, SignalHandler, PropertyHandler, FieldHandler, ConstantHandler, TemplateParameterListHandler, MethodHandler, DelegateHandler, EnumHandler, StructHandler, ClassHandler {
-	public Interface (Valadoc.Settings settings, Vala.Interface symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Interface (Valadoc.Settings settings, Vala.Interface symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.vinterface = symbol;
 	}
 
@@ -63,12 +63,12 @@ public class Valadoc.Interface : Api.TypeSymbolNode, SignalHandler, PropertyHand
 		langlet.write_interface ( this, ptr );
 	}
 
-	private void set_prerequisites ( Gee.Collection<Vala.DataType> lst ) {
+	private void set_prerequisites (Tree root, Gee.Collection<Vala.DataType> lst) {
 		if ( ((Gee.Collection)this.interfaces).size != 0 )
 			return ;
 
 		foreach ( Vala.DataType vtyperef in lst ) {
-			Basic? element = this.head.search_vala_symbol ( vtyperef.data_type );
+			Basic? element = root.search_vala_symbol ( vtyperef.data_type );
 			if ( element is Class )
 				this.base_type = (Class)element;
 			else
@@ -76,11 +76,11 @@ public class Valadoc.Interface : Api.TypeSymbolNode, SignalHandler, PropertyHand
 		}
 	}
 
-	protected override void resolve_type_references () {
-		var lst = this.vinterface.get_prerequisites ( );
-		this.set_prerequisites ( lst );
+	protected override void resolve_type_references (Tree root) {
+		var lst = this.vinterface.get_prerequisites ();
+		this.set_prerequisites (root, lst);
 
-		base.resolve_type_references ();
+		base.resolve_type_references (root);
 	}
 }
 
diff --git a/src/libvaladoc/apitree/method.vala b/src/libvaladoc/apitree/method.vala
index 2845c04..9b511de 100644
--- a/src/libvaladoc/apitree/method.vala
+++ b/src/libvaladoc/apitree/method.vala
@@ -26,8 +26,8 @@ using Gee;
 public class Valadoc.Method : Api.MemberNode, ParameterListHandler, ExceptionHandler, TemplateParameterListHandler, ReturnTypeHandler {
 	private Vala.Method vmethod;
 
-	public Method (Valadoc.Settings settings, Vala.Method symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Method (Valadoc.Settings settings, Vala.Method symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.vmethod = symbol;
 
 		var vret = this.vmethod.return_type;
@@ -107,7 +107,7 @@ public class Valadoc.Method : Api.MemberNode, ParameterListHandler, ExceptionHan
 		}
 	}
 
-	protected override void resolve_type_references () {
+	protected override void resolve_type_references (Tree root) {
 		Vala.Method? vm = null;
 		if (vmethod.base_method != null) {
 			vm = vmethod.base_method;
@@ -118,15 +118,15 @@ public class Valadoc.Method : Api.MemberNode, ParameterListHandler, ExceptionHan
 			vm = vmethod.base_interface_method;
 		}
 		if (vm != null) {
-			this.base_method = (Method?) this.head.search_vala_symbol (vm);
+			this.base_method = (Method?) root.search_vala_symbol (vm);
 		}
 
 		var vexceptionlst = this.vmethod.get_error_types ();
-		this.add_exception_list ( vexceptionlst );
+		this.add_exception_list (root, vexceptionlst);
 
-		this.set_return_type_references ();
+		this.set_return_type_references (root);
 
-		base.resolve_type_references ( );
+		base.resolve_type_references (root);
 	}
 
 	public void visit ( Doclet doclet, Valadoc.MethodHandler in_type ) {
diff --git a/src/libvaladoc/apitree/namespace.vala b/src/libvaladoc/apitree/namespace.vala
index 67f777f..8546da2 100644
--- a/src/libvaladoc/apitree/namespace.vala
+++ b/src/libvaladoc/apitree/namespace.vala
@@ -29,8 +29,8 @@ public class Valadoc.Namespace : Api.SymbolNode, MethodHandler, FieldHandler, Na
 {
 	private Comment source_comment;
 
-	public Namespace (Valadoc.Settings settings, Vala.Namespace symbol, NamespaceHandler parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Namespace (Valadoc.Settings settings, Vala.Namespace symbol, NamespaceHandler parent) {
+		base (settings, symbol, parent);
 
 		this.vnspace = symbol;
 
diff --git a/src/libvaladoc/apitree/namespacehandler.vala b/src/libvaladoc/apitree/namespacehandler.vala
index d08b4e4..8f8ba69 100644
--- a/src/libvaladoc/apitree/namespacehandler.vala
+++ b/src/libvaladoc/apitree/namespacehandler.vala
@@ -47,7 +47,7 @@ public interface Valadoc.NamespaceHandler : Api.Node {
 
 		Namespace ns = this.find_namespace_without_childs ( vns );
 		if ( ns == null ) {
-			ns = new Namespace( this.settings, vns, this, this.head );
+			ns = new Namespace (this.settings, vns, this);
 			add_child ( ns );
 		}
 
@@ -74,7 +74,7 @@ public interface Valadoc.NamespaceHandler : Api.Node {
 			return this.get_namespace_helper ( node, vnspaces, 1 );
 		}
 		else {
-			var ns = new Namespace( this.settings, vnspace, this, this.head );
+			var ns = new Namespace (this.settings, vnspace, this);
 			add_child ( ns );
 			return ns;
 		}
diff --git a/src/libvaladoc/apitree/package.vala b/src/libvaladoc/apitree/package.vala
index 088ebce..0b99a3c 100644
--- a/src/libvaladoc/apitree/package.vala
+++ b/src/libvaladoc/apitree/package.vala
@@ -85,8 +85,8 @@ public class Valadoc.Package : Api.Node, NamespaceHandler {
 		}
 	}
 
-	public Package.with_name (Valadoc.Settings settings, Vala.SourceFile vfile, string name, Tree root, bool is_package = false) {
-		base (settings, null, root);
+	public Package.with_name (Valadoc.Settings settings, Vala.SourceFile vfile, string name, bool is_package = false) {
+		base (settings, null);
 		this.is_package = is_package;
 
 		this.package_name = name;
@@ -95,8 +95,8 @@ public class Valadoc.Package : Api.Node, NamespaceHandler {
 		this.parent = null;
 	}
 
-	public Package (Valadoc.Settings settings, Vala.SourceFile vfile, Tree head, bool is_package = false) {
-		this.with_name (settings, vfile, this.extract_package_name (settings, vfile), head, is_package);
+	public Package (Valadoc.Settings settings, Vala.SourceFile vfile, bool is_package = false) {
+		this.with_name (settings, vfile, this.extract_package_name (settings, vfile), is_package);
 	}
 
 	private string package_name;
diff --git a/src/libvaladoc/apitree/pointer.vala b/src/libvaladoc/apitree/pointer.vala
index 8358d34..be693b7 100644
--- a/src/libvaladoc/apitree/pointer.vala
+++ b/src/libvaladoc/apitree/pointer.vala
@@ -32,35 +32,34 @@ public class Valadoc.Pointer : Basic {
 		get;
 	}
 
-	public Pointer (Valadoc.Settings settings, Vala.PointerType vtyperef, Basic parent, Tree head) {
+	public Pointer (Valadoc.Settings settings, Vala.PointerType vtyperef, Basic parent) {
 		this.settings = settings;
 		this.vtype = vtyperef;
 		this.parent = parent;
-		this.head = head;
 
 		Vala.DataType vntype = vtype.base_type;
 		if (vntype is Vala.PointerType)
-			this.data_type = new Pointer (settings, (Vala.PointerType)vntype, this, head);
+			this.data_type = new Pointer (settings, (Vala.PointerType) vntype, this);
 		else if (vntype is Vala.ArrayType)
-			this.data_type = new Array (settings, (Vala.ArrayType)vntype, this, head);
+			this.data_type = new Array (settings, (Vala.ArrayType) vntype, this);
 		else
-			this.data_type = new TypeReference (settings, vntype, this, head);
+			this.data_type = new TypeReference (settings, vntype, this);
 	}
 
 	public void write (Langlet langlet, void* ptr, DocumentedElement parent) {
 		langlet.write_pointer (this, ptr, parent);
 	}
 
-	protected override void resolve_type_references () {
+	protected override void resolve_type_references (Tree root) {
 		Basic type = this.data_type;
 		if ( type == null )
 			;
 		else if ( type is Array )
-			((Array)type).resolve_type_references ();
+			((Array) type).resolve_type_references (root);
 		else if ( type is Pointer )
-			((Pointer)type ).resolve_type_references ();
+			((Pointer) type ).resolve_type_references (root);
 		else
-			((TypeReference)type).resolve_type_references ();
+			((TypeReference) type).resolve_type_references (root);
 	}
 }
 
diff --git a/src/libvaladoc/apitree/property.vala b/src/libvaladoc/apitree/property.vala
index 01eacc6..8ba2768 100644
--- a/src/libvaladoc/apitree/property.vala
+++ b/src/libvaladoc/apitree/property.vala
@@ -26,8 +26,8 @@ using Gee;
 public class Valadoc.Property : Api.MemberNode, ReturnTypeHandler {
 	private Vala.Property vproperty;
 
-	public Property (Valadoc.Settings settings, Vala.Property symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Property (Valadoc.Settings settings, Vala.Property symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 
 		this.vproperty = symbol;
 
@@ -35,11 +35,11 @@ public class Valadoc.Property : Api.MemberNode, ReturnTypeHandler {
 		this.set_ret_type (ret);
 
 		if (this.vproperty.get_accessor != null) {
-			this.getter = new PropertyAccessor (this.settings, this.vproperty.get_accessor, this, this.head);
+			this.getter = new PropertyAccessor (this.settings, this.vproperty.get_accessor, this);
 		}
 
 		if (this.vproperty.set_accessor != null) {
-			this.setter = new PropertyAccessor (this.settings, this.vproperty.set_accessor, this, this.head);
+			this.setter = new PropertyAccessor (this.settings, this.vproperty.set_accessor, this);
 		}
 	}
 
@@ -94,7 +94,7 @@ public class Valadoc.Property : Api.MemberNode, ReturnTypeHandler {
 	}
 
 
-	protected override void resolve_type_references () {
+	protected override void resolve_type_references (Tree root) {
 		Vala.Property? vp = null;
 		if (vproperty.base_property != null) {
 			vp = vproperty.base_property;
@@ -105,9 +105,9 @@ public class Valadoc.Property : Api.MemberNode, ReturnTypeHandler {
 			vp = vproperty.base_interface_property;
 		}
 		if (vp != null) {
-			this.base_property = (Property?) this.head.search_vala_symbol (vp);
+			this.base_property = (Property?) root.search_vala_symbol (vp);
 		}
-		this.set_return_type_references ( );
+		this.set_return_type_references (root);
 	}
 
 	public void visit (Doclet doclet) {
diff --git a/src/libvaladoc/apitree/propertyaccessor.vala b/src/libvaladoc/apitree/propertyaccessor.vala
index 02d0f30..49b23b6 100644
--- a/src/libvaladoc/apitree/propertyaccessor.vala
+++ b/src/libvaladoc/apitree/propertyaccessor.vala
@@ -26,8 +26,8 @@ using Gee;
 public class Valadoc.PropertyAccessor : Api.SymbolNode {
 	private Vala.PropertyAccessor vpropacc;
 
-	public PropertyAccessor (Valadoc.Settings settings, Vala.PropertyAccessor symbol, Property parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public PropertyAccessor (Valadoc.Settings settings, Vala.PropertyAccessor symbol, Property parent) {
+		base (settings, symbol, parent);
 		this.vpropacc = symbol;
 	}
 
diff --git a/src/libvaladoc/apitree/returntypehandler.vala b/src/libvaladoc/apitree/returntypehandler.vala
index bc3b5b2..5f15723 100644
--- a/src/libvaladoc/apitree/returntypehandler.vala
+++ b/src/libvaladoc/apitree/returntypehandler.vala
@@ -27,16 +27,16 @@ public interface Valadoc.ReturnTypeHandler : Basic {
 		get;
 	}
 
-	internal void set_return_type_references () {
+	internal void set_return_type_references (Tree root) {
 		if ( this.type_reference == null )
 			return ;
 
-		this.type_reference.resolve_type_references ();
+		this.type_reference.resolve_type_references (root);
 	}
 
 	// rename
 	internal void set_ret_type ( Vala.DataType? vtref ) {
-		var tmp = new TypeReference ( this.settings, vtref, this, this.head );
+		var tmp = new TypeReference (this.settings, vtref, this);
 		this.type_reference = tmp;
 	}
 }
diff --git a/src/libvaladoc/apitree/signal.vala b/src/libvaladoc/apitree/signal.vala
index c59d8c1..ba3b73b 100644
--- a/src/libvaladoc/apitree/signal.vala
+++ b/src/libvaladoc/apitree/signal.vala
@@ -26,8 +26,8 @@ using Gee;
 public class Valadoc.Signal : Api.MemberNode, ParameterListHandler, ReturnTypeHandler {
 	private Vala.Signal vsignal;
 
-	public Signal (Valadoc.Settings settings, Vala.Signal symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Signal (Valadoc.Settings settings, Vala.Signal symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 
 		this.vsignal = symbol;
 
@@ -44,10 +44,10 @@ public class Valadoc.Signal : Api.MemberNode, ParameterListHandler, ReturnTypeHa
 		get;
 	}
 
-	protected override void resolve_type_references () {
-		this.set_return_type_references ( );
+	protected override void resolve_type_references (Tree root) {
+		this.set_return_type_references (root);
 
-		base.resolve_type_references ( );
+		base.resolve_type_references (root);
 	}
 
 	public bool is_virtual {
diff --git a/src/libvaladoc/apitree/struct.vala b/src/libvaladoc/apitree/struct.vala
index f5c4b75..786460c 100644
--- a/src/libvaladoc/apitree/struct.vala
+++ b/src/libvaladoc/apitree/struct.vala
@@ -26,8 +26,8 @@ using Gee;
 public class Valadoc.Struct : Api.TypeSymbolNode, MethodHandler, ConstructionMethodHandler, FieldHandler, ConstantHandler, TemplateParameterListHandler {
 	private Vala.Struct vstruct;
 
-	public Struct (Valadoc.Settings settings, Vala.Struct symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public Struct (Valadoc.Settings settings, Vala.Struct symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 		this.vstruct = symbol;
 	}
 
@@ -57,18 +57,18 @@ public class Valadoc.Struct : Api.TypeSymbolNode, MethodHandler, ConstructionMet
 		langlet.write_struct (this, ptr);
 	}
 
-	private void set_parent_references ( ) {
-		Vala.ValueType? basetype = (Vala.ValueType?)this.vstruct.base_type;
+	private void set_parent_references (Tree root) {
+		Vala.ValueType? basetype = this.vstruct.base_type as Vala.ValueType;
 		if (basetype == null)
 			return ;
 
-		this.base_type = (Struct?)this.head.search_vala_symbol ( (Vala.Struct)basetype.type_symbol );
+		this.base_type = (Struct?) root.search_vala_symbol ((Vala.Struct) basetype.type_symbol);
 	}
 
-	protected override void resolve_type_references () {
-		this.set_parent_references ( );
+	protected override void resolve_type_references (Tree root) {
+		this.set_parent_references (root);
 
-		base.resolve_type_references ( );
+		base.resolve_type_references (root);
 	}
 }
 
diff --git a/src/libvaladoc/apitree/typeparameter.vala b/src/libvaladoc/apitree/typeparameter.vala
index 67116c6..607a384 100644
--- a/src/libvaladoc/apitree/typeparameter.vala
+++ b/src/libvaladoc/apitree/typeparameter.vala
@@ -25,8 +25,8 @@ using Gee;
 
 public class Valadoc.TypeParameter : Api.SymbolNode, ReturnTypeHandler {
 
-	public TypeParameter (Valadoc.Settings settings, Vala.TypeParameter symbol, Api.Node parent, Tree root) {
-		base (settings, symbol, parent, root);
+	public TypeParameter (Valadoc.Settings settings, Vala.TypeParameter symbol, Api.Node parent) {
+		base (settings, symbol, parent);
 	}
 
 	public TypeReference? type_reference {
diff --git a/src/libvaladoc/apitree/typereference.vala b/src/libvaladoc/apitree/typereference.vala
index c17a6b7..86e1a98 100644
--- a/src/libvaladoc/apitree/typereference.vala
+++ b/src/libvaladoc/apitree/typereference.vala
@@ -27,21 +27,20 @@ public class Valadoc.TypeReference : Basic {
 	private Gee.ArrayList<TypeReference> type_arguments = new Gee.ArrayList<TypeReference> ();
 	private Vala.DataType? vtyperef;
 
-	public TypeReference ( Valadoc.Settings settings, Vala.DataType? vtyperef, Basic parent, Tree head ) {
+	public TypeReference (Valadoc.Settings settings, Vala.DataType? vtyperef, Basic parent) {
 		this.settings = settings;
 		this.vtyperef = vtyperef;
 		this.parent = parent;
-		this.head = head;
 	}
 
 	public Gee.Collection<TypeReference> get_type_arguments ( ) {
 		return this.type_arguments.read_only_view;
 	}
 
-	private void set_template_argument_list ( Gee.Collection<Vala.DataType> varguments ) {
+	private void set_template_argument_list (Tree root, Gee.Collection<Vala.DataType> varguments) {
 		foreach ( Vala.DataType vdtype in varguments ) {
-			var dtype = new TypeReference ( this.settings, vdtype, this, this.head );
-			dtype.resolve_type_references ( );
+			var dtype = new TypeReference (this.settings, vdtype, this);
+			dtype.resolve_type_references (root);
 			this.type_arguments.add ( dtype );
 		}
 	}
@@ -185,41 +184,41 @@ public class Valadoc.TypeReference : Basic {
 		}
 	}
 
-	protected override void resolve_type_references () {
+	protected override void resolve_type_references (Tree root) {
 		if ( this.vtyperef != null ) {
 			if ( this.vtyperef is PointerType )
-				this.data_type = new Pointer ( settings, (Vala.PointerType)this.vtyperef, this, head );
+				this.data_type = new Pointer (settings, (Vala.PointerType) this.vtyperef, this);
 			else if ( vtyperef is ArrayType )
-				this.data_type = new Array ( settings, (Vala.ArrayType)this.vtyperef, this, head );
+				this.data_type = new Array (settings, (Vala.ArrayType) this.vtyperef, this);
 			else if ( vtyperef is GenericType )
-				 this.data_type = (TypeParameter) this.head.search_vala_symbol (((Vala.ArrayType) this.vtyperef).type_parameter);
+				 this.data_type = (TypeParameter) root.search_vala_symbol (((Vala.GenericType) this.vtyperef).type_parameter);
 		}
 
 
 		if ( this.data_type == null ) {
 			Vala.DataType vtype = this.vtyperef;
-			this.set_template_argument_list ( vtype.get_type_arguments ()  );
+			this.set_template_argument_list (root, vtype.get_type_arguments ());
 			// still necessary?
 			if ( vtype is Vala.ErrorType ) {
 				Vala.ErrorDomain verrdom = ((Vala.ErrorType)vtype).error_domain;
 				if ( verrdom != null )
-					this.data_type = this.head.search_vala_symbol ( verrdom );
+					this.data_type = root.search_vala_symbol ( verrdom );
 				else
 					this.data_type = glib_error;
 			}
 			// necessary?
 			else if (vtype is Vala.DelegateType ) {
-				this.data_type = this.head.search_vala_symbol ( ((Vala.DelegateType)vtype).delegate_symbol );
+				this.data_type = root.search_vala_symbol ( ((Vala.DelegateType)vtype).delegate_symbol );
 			}
 			else {
-				this.data_type = this.head.search_vala_symbol ( vtype.data_type );
+				this.data_type = root.search_vala_symbol ( vtype.data_type );
 			}
 		}
 		else if ( this.data_type is Pointer ) {
-			((Pointer)this.data_type).resolve_type_references ();
+			((Pointer)this.data_type).resolve_type_references (root);
 		}
 		else if ( this.data_type is Array ) {
-			((Array)this.data_type).resolve_type_references ();
+			((Array)this.data_type).resolve_type_references (root);
 		}
 	}
 



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