[vala/0.48] girparser: Add support for string "feature_test_macro" metadata



commit dd8e1860f3c39e9fa68ecf800fdd52716ccad111
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Aug 5 08:21:14 2020 +0200

    girparser: Add support for string "feature_test_macro" metadata

 vala/valagirparser.vala | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index 947736f43..70ca86975 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -83,6 +83,7 @@ public class Vala.GirParser : CodeVisitor {
                SYMBOL_TYPE,
                INSTANCE_IDX,
                EXPERIMENTAL,
+               FEATURE_TEST_MACRO,
                FLOATING,
                TYPE_ID,
                RETURN_VOID,
@@ -1242,6 +1243,10 @@ public class Vala.GirParser : CodeVisitor {
                                        symbol.set_attribute_string ("CCode", "cname", get_cname ());
                                }
 
+                               if (metadata.has_argument (ArgumentType.FEATURE_TEST_MACRO)) {
+                                       symbol.set_attribute_string ("CCode", "feature_test_macro", 
metadata.get_string (ArgumentType.FEATURE_TEST_MACRO));
+                               }
+
                                // lower_case_cprefix
                                if (get_lower_case_cprefix () != get_default_lower_case_cprefix ()) {
                                        symbol.set_attribute_string ("CCode", "lower_case_cprefix", 
get_lower_case_cprefix ());


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