From: Juerg Billeter Date: Sat, 1 Mar 2008 16:21:55 +0000 (+0000) Subject: don't register private properties with GObject property system, fixes bug X-Git-Tag: VALA_0_1_7~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=87d887a3dbd1d55c57278f598d1cda3f4f0e6558;p=platform%2Fupstream%2Fvala.git don't register private properties with GObject property system, fixes bug 2008-03-01 Juerg Billeter * gobject/valaccodegenerator.vala, gobject/valaccodegeneratorclass.vala: don't register private properties with GObject property system, fixes bug 519201 svn path=/trunk/; revision=1079 --- diff --git a/ChangeLog b/ChangeLog index 6d66523..6b60fbf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-03-01 Jürg Billeter + * gobject/valaccodegenerator.vala, + gobject/valaccodegeneratorclass.vala: don't register private + properties with GObject property system, fixes bug 519201 + +2008-03-01 Jürg Billeter + * vapi/Makefile.am, vapi/hildon-fm-2.deps, vapi/hildon-fm-2.vapi, vapi/packages/hildon-fm-2/: add hildon-fm-2 bindings, based on patch by Levi Bard, fixes bug 511092 diff --git a/gobject/valaccodegenerator.vala b/gobject/valaccodegenerator.vala index e9aa25a..3d02ca9 100644 --- a/gobject/valaccodegenerator.vala +++ b/gobject/valaccodegenerator.vala @@ -619,7 +619,8 @@ public class Vala.CCodeGenerator : CodeGenerator { next_temp_var_id = old_next_temp_var_id; // FIXME: omit real struct types for now since they cannot be expressed as gobject property yet - if (prop.parent_symbol is Class && !prop.type_reference.is_real_struct_type ()) { + // don't register private properties + if (prop.parent_symbol is Class && !prop.type_reference.is_real_struct_type () && prop.access != SymbolAccessibility.PRIVATE) { prop_enum.add_value (new CCodeEnumValue (prop.get_upper_case_cname ())); } } diff --git a/gobject/valaccodegeneratorclass.vala b/gobject/valaccodegeneratorclass.vala index 63ee50a..4c0bf64 100644 --- a/gobject/valaccodegeneratorclass.vala +++ b/gobject/valaccodegeneratorclass.vala @@ -418,6 +418,11 @@ public class Vala.CCodeGenerator { if (prop.type_reference.is_real_struct_type ()) { continue; } + if (prop.access == SymbolAccessibility.PRIVATE) { + // don't register private properties + continue; + } + if (prop.overrides || prop.base_interface_property != null) { var cinst = new CCodeFunctionCall (new CCodeIdentifier ("g_object_class_override_property")); cinst.add_argument (ccall); @@ -601,6 +606,10 @@ public class Vala.CCodeGenerator { if (prop.get_accessor == null || prop.is_abstract || prop.type_reference.is_real_struct_type ()) { continue; } + if (prop.access == SymbolAccessibility.PRIVATE) { + // don't register private properties + continue; + } bool is_virtual = prop.base_property != null || prop.base_interface_property != null; @@ -652,6 +661,10 @@ public class Vala.CCodeGenerator { if (prop.set_accessor == null || prop.is_abstract || prop.type_reference.is_real_struct_type ()) { continue; } + if (prop.access == SymbolAccessibility.PRIVATE) { + // don't register private properties + continue; + } bool is_virtual = prop.base_property != null || prop.base_interface_property != null;