[vala/staging] girparser: Add support for NoWrapper metadata for methods
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] girparser: Add support for NoWrapper metadata for methods
- Date: Tue, 16 Mar 2021 14:34:44 +0000 (UTC)
commit c7d99edd9d8b3632350f41e5cf12bdcdc4080ce1
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue Mar 16 15:34:02 2021 +0100
girparser: Add support for NoWrapper metadata for methods
vala/valagirparser.vala | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 3a0838dea..b1086b893 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -94,6 +94,7 @@ public class Vala.GirParser : CodeVisitor {
DESTROY_NOTIFY_CNAME,
FINISH_VFUNC_NAME,
NO_ACCESSOR_METHOD,
+ NO_WRAPPER,
CNAME,
DELEGATE_TARGET,
CTYPE;
@@ -3319,9 +3320,12 @@ public class Vala.GirParser : CodeVisitor {
} else {
m.is_virtual = true;
}
- if (invoker == null && !metadata.has_argument (ArgumentType.VFUNC_NAME)) {
+ if (metadata.has_argument (ArgumentType.NO_WRAPPER)) {
+ s.set_attribute ("NoWrapper", metadata.get_bool
(ArgumentType.NO_WRAPPER), s.source_reference);
+ } else if (invoker == null && !metadata.has_argument
(ArgumentType.VFUNC_NAME)) {
s.set_attribute ("NoWrapper", true, s.source_reference);
- } if (current.girdata["name"] != name) {
+ }
+ if (current.girdata["name"] != name) {
m.set_attribute_string ("CCode", "vfunc_name",
current.girdata["name"]);
}
} else if (symbol_type == "function") {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]