From: Jürg Billeter Date: Wed, 10 Feb 2010 10:53:46 +0000 (+0100) Subject: GObject: Fix invalid code with string-derived properties X-Git-Tag: 0.8.0~290 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e98c5df3db6d47f0e2462e294be63fc8385c5916;p=thirdparty%2Fvala.git GObject: Fix invalid code with string-derived properties Fixes bug 609475. --- diff --git a/codegen/valagtypemodule.vala b/codegen/valagtypemodule.vala index cd0d58e26..5a028b52b 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 ()));