vala r1750 - in trunk: . gobject



Author: juergbi
Date: Thu Aug 14 19:55:23 2008
New Revision: 1750
URL: http://svn.gnome.org/viewvc/vala?rev=1750&view=rev

Log:
2008-08-14  JÃrg Billeter  <j bitron ch>

	* gobject/valaccodegenerator.vala:

	Add missing casts and checks for non-GObject classes


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

Modified: trunk/gobject/valaccodegenerator.vala
==============================================================================
--- trunk/gobject/valaccodegenerator.vala	(original)
+++ trunk/gobject/valaccodegenerator.vala	Thu Aug 14 19:55:23 2008
@@ -3471,8 +3471,8 @@
 			var left_type_as_struct = expr.left.value_type.data_type as Struct;
 			var right_type_as_struct = expr.right.value_type.data_type as Struct;
 
-			if (expr.left.value_type.data_type is Class && ((Class) expr.left.value_type.data_type).is_subtype_of (gobject_type) &&
-			    expr.right.value_type.data_type is Class && ((Class) expr.right.value_type.data_type).is_subtype_of (gobject_type)) {
+			if (expr.left.value_type.data_type is Class && !((Class) expr.left.value_type.data_type).is_compact &&
+			    expr.right.value_type.data_type is Class && !((Class) expr.right.value_type.data_type).is_compact) {
 				var left_cl = (Class) expr.left.value_type.data_type;
 				var right_cl = (Class) expr.right.value_type.data_type;
 				
@@ -4048,7 +4048,7 @@
 	public CCodeStatement? create_type_check_statement (CodeNode method_node, DataType ret_type, TypeSymbol t, bool non_null, string var_name) {
 		var ccheck = new CCodeFunctionCall ();
 		
-		if ((t is Class && ((Class) t).is_subtype_of (gobject_type)) || t is Interface) {
+		if ((t is Class && !((Class) t).is_compact) || t is Interface) {
 			var ctype_check = new CCodeFunctionCall (new CCodeIdentifier (get_type_check_function (t)));
 			ctype_check.add_argument (new CCodeIdentifier (var_name));
 			



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