vala r854 - in trunk: . gobject



Author: juergbi
Date: Fri Jan 18 19:12:30 2008
New Revision: 854
URL: http://svn.gnome.org/viewvc/vala?rev=854&view=rev

Log:
2008-01-18  Juerg Billeter  <j bitron ch>

	* gobject/valaccodegenerator.vala: don't generate public setter for
	  construct-only properties, fixes bug 479062


Modified:
   trunk/ChangeLog
   trunk/gobject/valaccodegenerator.vala

Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala	(original)
+++ trunk/gobject/valaccodegenerator.vala	Fri Jan 18 19:12:30 2008
@@ -573,7 +573,8 @@
 				function.add_parameter (cvalueparam);
 			}
 			
-			if (!prop.is_internal_symbol ()) {
+			if (!prop.is_internal_symbol () && (acc.readable || acc.writable)) {
+				// accessor function should be public if the property is a public symbol and it's not a construct-only setter
 				header_type_member_declaration.append (function.copy ());
 			} else {
 				function.modifiers |= CCodeModifiers.STATIC;
@@ -656,7 +657,8 @@
 			}
 
 			if (!is_virtual) {
-				if (!prop.is_internal_symbol ()) {
+				if (!prop.is_internal_symbol () && (acc.readable || acc.writable)) {
+					// accessor function should be public if the property is a public symbol and it's not a construct-only setter
 					header_type_member_declaration.append (function.copy ());
 				} else {
 					function.modifiers |= CCodeModifiers.STATIC;



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