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



commit 5aaf51de3dc96c767d9b7b221f6161ae6ec8a281
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 dd2039d5f..e0202b6a4 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -81,6 +81,7 @@ public class Vala.GirParser : CodeVisitor {
                SYMBOL_TYPE,
                INSTANCE_IDX,
                EXPERIMENTAL,
+               FEATURE_TEST_MACRO,
                FLOATING,
                TYPE_ID,
                RETURN_VOID,
@@ -1241,6 +1242,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]