[vala/switch-to-gir: 46/51] girparser: Store all attributes in girdata for all symbols.



commit 508d551bd8089ee2a1512b8b5d0d3311e15930d0
Author: Luca Bruno <lucabru src gnome org>
Date:   Thu Jan 6 12:21:34 2011 +0100

    girparser: Store all attributes in girdata for all symbols.

 vala/valagirparser.vala |   12 ++++--------
 1 files changed, 4 insertions(+), 8 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index af7308a..eaddd1d 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -508,7 +508,7 @@ public class Vala.GirParser : CodeVisitor {
 		public Symbol symbol;
 		public Metadata metadata;
 		// additional information from GIR
-		public HashMap<string,string> girdata;
+		public Map<string,string> girdata;
 	}
 
 	class Alias {
@@ -538,8 +538,8 @@ public class Vala.GirParser : CodeVisitor {
 
 	ArrayList<Metadata> metadata_stack;
 	Metadata metadata;
-	ArrayList<HashMap<string,string>> girdata_stack;
-	HashMap<string,string> girdata;
+	ArrayList<Map<string,string>> girdata_stack;
+	Map<string,string> girdata;
 
 	ArrayList<SymbolInfo> current_symbols_info;
 
@@ -1155,7 +1155,7 @@ public class Vala.GirParser : CodeVisitor {
 		metadata_stack.add (metadata);
 		metadata = new_metadata;
 		girdata_stack.add (girdata);
-		girdata = new HashMap<string,string> (str_hash, str_equal);
+		girdata = reader.get_attributes ();
 
 		return true;
 	}
@@ -1994,11 +1994,7 @@ public class Vala.GirParser : CodeVisitor {
 		if (cname != null) {
 			st.set_cname (cname);
 		}
-
 		current_gtype_struct_for = reader.get_attribute ("glib:is-gtype-struct-for");
-		if (current_gtype_struct_for != null) {
-			girdata["glib:is-gtype-struct-for"] = current_gtype_struct_for;
-		}
 
 		next ();
 		var old_symbols_info = current_symbols_info;



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