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

index a0bf8bce4a3eeb81b0743e8e4e04f6dea3594070..af24d2928595a93a845558304488d263b5805a87 100644 (file)
@@ -205,7 +205,14 @@ public class Vala.Method : Subroutine {
         * Specifies whether a construct function with a GType parameter is
         * available. This is only applicable to creation methods.
         */
-       public bool has_construct_function { get; set; default = true; }
+       public bool has_construct_function {
+               get {
+                       return get_attribute_bool ("CCode", "has_construct_function", true);
+               }
+               set {
+                       set_attribute_bool ("CCode", "has_construct_function", value);
+               }
+       }
 
        public bool has_generic_type_parameter { get; set; }
 
@@ -463,9 +470,6 @@ public class Vala.Method : Subroutine {
                if (a.has_argument ("has_new_function")) {
                        has_new_function = a.get_bool ("has_new_function");
                }
-               if (a.has_argument ("has_construct_function")) {
-                       has_construct_function = a.get_bool ("has_construct_function");
-               }
                if (a.has_argument ("generic_type_pos")) {
                        has_generic_type_parameter = true;
                        generic_type_parameter_position = a.get_double ("generic_type_pos");