[vala/wip/attributes: 27/40] On-demand Method.has_construct_function



commit cb7df63552b6542d1f9780cbbd4ac85eec8aa234
Author: Luca Bruno <lucabru src gnome org>
Date:   Thu Jul 7 17:36:41 2011 +0200

    On-demand Method.has_construct_function

 vala/valamethod.vala |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/vala/valamethod.vala b/vala/valamethod.vala
index a0bf8bc..af24d29 100644
--- a/vala/valamethod.vala
+++ b/vala/valamethod.vala
@@ -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");



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