[vala/staging] girparser: Apply "type_get_function" metadata for classes and inferfaces
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] girparser: Apply "type_get_function" metadata for classes and inferfaces
- Date: Sat, 30 Jan 2021 20:20:20 +0000 (UTC)
commit 3626df869d911fec13263c03b16bbb6d0162f70a
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Sat Jan 30 21:17:25 2021 +0100
girparser: Apply "type_get_function" metadata for classes and inferfaces
vala/valagirparser.vala | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index ca25d5508..fa6773f81 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -86,6 +86,7 @@ public class Vala.GirParser : CodeVisitor {
FEATURE_TEST_MACRO,
FLOATING,
TYPE_ID,
+ TYPE_GET_FUNCTION,
RETURN_VOID,
RETURNS_MODIFIED_POINTER,
DELEGATE_TARGET_CNAME,
@@ -2947,6 +2948,9 @@ public class Vala.GirParser : CodeVisitor {
cl = new Class (current.name, current.source_reference);
cl.is_abstract = metadata.get_bool (ArgumentType.ABSTRACT, reader.get_attribute
("abstract") == "1");
cl.is_sealed = metadata.get_bool (ArgumentType.SEALED, false);
+ if (metadata.has_argument (ArgumentType.TYPE_GET_FUNCTION)) {
+ cl.set_attribute_string ("CCode", "type_get_function", metadata.get_string
(ArgumentType.TYPE_GET_FUNCTION));
+ }
if (parent != null) {
cl.add_base_type (parse_type_from_gir_name (parent));
@@ -3029,6 +3033,10 @@ public class Vala.GirParser : CodeVisitor {
Interface iface;
if (current.new_symbol) {
iface = new Interface (current.name, current.source_reference);
+ if (metadata.has_argument (ArgumentType.TYPE_GET_FUNCTION)){
+ iface.set_attribute_string ("CCode", "type_get_function", metadata.get_string
(ArgumentType.TYPE_GET_FUNCTION));
+ }
+
current.symbol = iface;
} else {
iface = (Interface) current.symbol;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]