]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
On-demand Method.returns_floating_reference
authorLuca Bruno <lucabru@src.gnome.org>
Thu, 7 Jul 2011 15:40:09 +0000 (17:40 +0200)
committerLuca Bruno <lucabru@src.gnome.org>
Mon, 1 Aug 2011 16:17:06 +0000 (18:17 +0200)
vala/valamethod.vala

index af24d2928595a93a845558304488d263b5805a87..efa5f0ebd4252fe9c26fe109f6255502af48719c 100644 (file)
@@ -109,7 +109,14 @@ public class Vala.Method : Subroutine {
         */
        public bool is_inline { get; set; }
 
-       public bool returns_floating_reference { get; set; }
+       public bool returns_floating_reference {
+               get {
+                       return get_attribute_bool ("CCode", "returns_floating_reference");
+               }
+               set {
+                       set_attribute_bool ("CCode", "returns_floating_reference", value);
+               }
+       }
 
        /**
         * Specifies whether the C method returns a new instance pointer which
@@ -477,9 +484,6 @@ public class Vala.Method : Subroutine {
                if (a.has_argument ("simple_generics")) {
                        simple_generics = a.get_bool ("simple_generics");
                }
-               if (a.has_argument ("returns_floating_reference")) {
-                       returns_floating_reference = a.get_bool ("returns_floating_reference");
-               }
                if (a.has_argument ("type")) {
                        custom_return_type_cname = a.get_string ("type");
                }