[vala] GObject: Declare property accessors used in get/set_property



commit 9863b9081f411b712fc958e883a98c56ed35175d
Author: Jürg Billeter <j bitron ch>
Date:   Wed Sep 16 14:03:03 2009 +0200

    GObject: Declare property accessors used in get/set_property

 codegen/valagobjectmodule.vala |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/codegen/valagobjectmodule.vala b/codegen/valagobjectmodule.vala
index bc357ea..7b3b515 100644
--- a/codegen/valagobjectmodule.vala
+++ b/codegen/valagobjectmodule.vala
@@ -210,10 +210,14 @@ internal class Vala.GObjectModule : GTypeModule {
 				var base_type = (Class) prop.base_property.parent_symbol;
 				prefix = base_type.get_lower_case_cname (null);
 				cself = transform_expression (cself, new ObjectType (cl), new ObjectType (base_type));
+
+				generate_property_accessor_declaration (prop.base_property.get_accessor, source_declarations);
 			} else if (prop.base_interface_property != null) {
 				var base_type = (Interface) prop.base_interface_property.parent_symbol;
 				prefix = base_type.get_lower_case_cname (null);
 				cself = transform_expression (cself, new ObjectType (cl), new ObjectType (base_type));
+
+				generate_property_accessor_declaration (prop.base_interface_property.get_accessor, source_declarations);
 			}
 
 			cswitch.add_statement (new CCodeCaseStatement (new CCodeIdentifier (prop.get_upper_case_cname ())));
@@ -286,10 +290,14 @@ internal class Vala.GObjectModule : GTypeModule {
 				var base_type = (Class) prop.base_property.parent_symbol;
 				prefix = base_type.get_lower_case_cname (null);
 				cself = transform_expression (cself, new ObjectType (cl), new ObjectType (base_type));
+
+				generate_property_accessor_declaration (prop.base_property.set_accessor, source_declarations);
 			} else if (prop.base_interface_property != null) {
 				var base_type = (Interface) prop.base_interface_property.parent_symbol;
 				prefix = base_type.get_lower_case_cname (null);
 				cself = transform_expression (cself, new ObjectType (cl), new ObjectType (base_type));
+
+				generate_property_accessor_declaration (prop.base_interface_property.set_accessor, source_declarations);
 			}
 
 			cswitch.add_statement (new CCodeCaseStatement (new CCodeIdentifier (prop.get_upper_case_cname ())));



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