vala r1799 - in trunk: . gobject



Author: juergbi
Date: Sat Sep 27 10:02:06 2008
New Revision: 1799
URL: http://svn.gnome.org/viewvc/vala?rev=1799&view=rev

Log:
2008-09-27  JÃrg Billeter  <j bitron ch>

	* gobject/valaccodeinterfacebinding.vala:

	Fix runtime error when using non-abstract properties in interfaces,
	fixes bug 539719


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

Modified: trunk/gobject/valaccodeinterfacebinding.vala
==============================================================================
--- trunk/gobject/valaccodeinterfacebinding.vala	(original)
+++ trunk/gobject/valaccodeinterfacebinding.vala	Sat Sep 27 10:02:06 2008
@@ -121,11 +121,13 @@
 			/* create properties */
 			var props = iface.get_properties ();
 			foreach (Property prop in props) {
-				var cinst = new CCodeFunctionCall (new CCodeIdentifier ("g_object_interface_install_property"));
-				cinst.add_argument (new CCodeIdentifier ("iface"));
-				cinst.add_argument (get_param_spec (prop));
+				if (prop.is_abstract) {
+					var cinst = new CCodeFunctionCall (new CCodeIdentifier ("g_object_interface_install_property"));
+					cinst.add_argument (new CCodeIdentifier ("iface"));
+					cinst.add_argument (get_param_spec (prop));
 
-				init_block.add_statement (new CCodeExpressionStatement (cinst));
+					init_block.add_statement (new CCodeExpressionStatement (cinst));
+				}
 			}
 		}
 



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