[vala/switch-to-gir: 3/25] girparser: Support reparenting static methods in namespace



commit 28ec6f7e86f7a317e8397ee7fc5cc3869b5ca4b1
Author: Luca Bruno <lucabru src gnome org>
Date:   Mon Nov 8 15:39:53 2010 +0100

    girparser: Support reparenting static methods in namespace

 vala/valagirparser.vala |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index fe0f659..37f14cd 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -1385,7 +1385,9 @@ public class Vala.GirParser : CodeVisitor {
 			} else if (reader.name == "bitfield") {
 				add_symbol_info (parse_bitfield ());
 			} else if (reader.name == "function") {
-				current_namespace_methods.add (parse_method ("function"));
+				var method = parse_method ("function");
+				add_symbol_info (method);
+				current_namespace_methods.add (method);
 			} else if (reader.name == "callback") {
 				add_symbol_info (parse_callback ());
 			} else if (reader.name == "record") {
@@ -2785,7 +2787,7 @@ public class Vala.GirParser : CodeVisitor {
 			var ns_cprefix = ns.get_lower_case_cprefix ();
 			var methods = namespace_methods[ns];
 			foreach (var method in methods) {
-				if (method.parent_node != null) {
+				if (method.parent_symbol != null) {
 					// fixed earlier by metadata
 					continue;
 				}



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