vala r966 - in trunk: . gobject



Author: juergbi
Date: Mon Feb  4 23:17:59 2008
New Revision: 966
URL: http://svn.gnome.org/viewvc/vala?rev=966&view=rev

Log:
2008-02-05  Juerg Billeter  <j bitron ch>

	* gobject/valaccodeassignmentbinding.vala,
	  gobject/valaccodegenerator.vala: don't use construction properties
	  for classes not deriving from GObject, fixes bug 514323


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

Modified: trunk/gobject/valaccodeassignmentbinding.vala
==============================================================================
--- trunk/gobject/valaccodeassignmentbinding.vala	(original)
+++ trunk/gobject/valaccodeassignmentbinding.vala	Mon Feb  4 23:17:59 2008
@@ -38,7 +38,7 @@
 
 		var prop = (Property) assignment.left.symbol_reference;
 
-		if (prop.set_accessor.construction && codegen.current_type_symbol is Class && codegen.in_creation_method) {
+		if (prop.set_accessor.construction && codegen.current_type_symbol is Class && codegen.current_class.is_subtype_of (codegen.gobject_type) && codegen.in_creation_method) {
 			// this property is used as a construction parameter
 			var cpointer = new CCodeIdentifier ("__params_it");
 			

Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala	(original)
+++ trunk/gobject/valaccodegenerator.vala	Mon Feb  4 23:17:59 2008
@@ -33,7 +33,7 @@
 	Symbol root_symbol;
 	Symbol current_symbol;
 	public Typesymbol current_type_symbol;
-	Class current_class;
+	public Class current_class;
 	Method current_method;
 	DataType current_return_type;
 	TryStatement current_try;



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