[vala] girparser: Add metadata-support for "returns_modified_pointer"



commit 494727cca3e1d5f73f1be6b5b2bcfb12eb7aec04
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Wed Mar 8 10:28:37 2017 +0100

    girparser: Add metadata-support for "returns_modified_pointer"
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759255

 vala/valagirparser.vala |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index b122094..524e8c3 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -82,6 +82,7 @@ public class Vala.GirParser : CodeVisitor {
                FLOATING,
                TYPE_ID,
                RETURN_VOID,
+               RETURNS_MODIFIED_POINTER,
                DELEGATE_TARGET_CNAME,
                FINISH_VFUNC_NAME;
 
@@ -922,6 +923,9 @@ public class Vala.GirParser : CodeVisitor {
                                                if (metadata.has_argument (ArgumentType.DESTROYS_INSTANCE)) {
                                                        m.set_attribute ("DestroysInstance", 
metadata.get_bool (ArgumentType.DESTROYS_INSTANCE));
                                                }
+                                               if (metadata.has_argument 
(ArgumentType.RETURNS_MODIFIED_POINTER)) {
+                                                       m.set_attribute ("ReturnsModifiedPointer", 
metadata.get_bool (ArgumentType.RETURNS_MODIFIED_POINTER));
+                                               }
                                                // merge custom vfunc
                                                if (metadata.has_argument (ArgumentType.VFUNC_NAME)) {
                                                        var vfunc = parent.lookup (metadata.get_string 
(ArgumentType.VFUNC_NAME));


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