[vala] GObject: Fix invalid code with string-derived properties



commit e98c5df3db6d47f0e2462e294be63fc8385c5916
Author: Jürg Billeter <j bitron ch>
Date:   Wed Feb 10 11:53:46 2010 +0100

    GObject: Fix invalid code with string-derived properties
    
    Fixes bug 609475.

 codegen/valagtypemodule.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala
index cd0d58e..5a028b5 100644
--- a/codegen/valagtypemodule.vala
+++ b/codegen/valagtypemodule.vala
@@ -1,6 +1,6 @@
 /* valagtypemodule.vala
  *
- * Copyright (C) 2006-2009  Jürg Billeter
+ * Copyright (C) 2006-2010  Jürg Billeter
  * Copyright (C) 2006-2008  Raffaele Sandrini
  *
  * This library is free software; you can redistribute it and/or
@@ -1555,7 +1555,7 @@ internal class Vala.GTypeModule : GErrorModule {
 		if (prop.property_type.data_type is Class || prop.property_type.data_type is Interface) {
 			string param_spec_name = prop.property_type.data_type.get_param_spec_function ();
 			cspec.call = new CCodeIdentifier (param_spec_name);
-			if (prop.property_type.data_type == string_type.data_type) {
+			if (param_spec_name == "g_param_spec_string") {
 				cspec.add_argument (new CCodeConstant ("NULL"));
 			} else if (prop.property_type.data_type.get_type_id () != "G_TYPE_POINTER") {
 				cspec.add_argument (new CCodeIdentifier (prop.property_type.data_type.get_type_id ()));



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