[vala/switch-to-gir-gio: 39/43] girparser: Merge virtual method specified in metadata.
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/switch-to-gir-gio: 39/43] girparser: Merge virtual method specified in metadata.
- Date: Thu, 6 Jan 2011 00:33:54 +0000 (UTC)
commit 5376a667626cd850f958947fbe323d6cae0fe973
Author: Luca Bruno <lucabru src gnome org>
Date: Thu Dec 30 19:44:18 2010 +0100
girparser: Merge virtual method specified in metadata.
vala/valagirparser.vala | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 97bceaf..527b694 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -958,8 +958,8 @@ public class Vala.GirParser : CodeVisitor {
m.attributes.remove (attr);
merged.add (invoker);
different_invoker = true;
- break;
}
+ break;
}
}
if (!different_invoker) {
@@ -967,6 +967,13 @@ public class Vala.GirParser : CodeVisitor {
}
}
}
+ // merge custom vfunc
+ if (info.metadata.has_argument (ArgumentType.VFUNC_NAME)) {
+ var vfunc = get_current_first_symbol_info (info.metadata.get_string (ArgumentType.VFUNC_NAME));
+ if (vfunc != null && vfunc != info) {
+ merged.add (vfunc);
+ }
+ }
if (m.coroutine) {
// handle async methods
string finish_method_base;
@@ -2318,7 +2325,10 @@ public class Vala.GirParser : CodeVisitor {
method.is_abstract = metadata.get_bool (ArgumentType.ABSTRACT);
method.is_virtual = false;
}
- method.vfunc_name = metadata.get_string (ArgumentType.VFUNC_NAME);
+ if (metadata.has_argument (ArgumentType.VFUNC_NAME)) {
+ method.vfunc_name = metadata.get_string (ArgumentType.VFUNC_NAME);
+ method.is_virtual = true;
+ }
}
var parameters = new ArrayList<ParameterInfo> ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]