]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
GObject: Fix invalid code with string-derived properties
authorJürg Billeter <j@bitron.ch>
Wed, 10 Feb 2010 10:53:46 +0000 (11:53 +0100)
committerJürg Billeter <j@bitron.ch>
Wed, 10 Feb 2010 10:53:46 +0000 (11:53 +0100)
Fixes bug 609475.

codegen/valagtypemodule.vala

index cd0d58e262ec61cc67354d6e86f0a7f824a1d57b..5a028b52b60bd013a582ddd44bedcb02edfc81f5 100644 (file)
@@ -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 ()));