Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?
- From: Michael Natterer <mitch gimp org>
- To: Andrew Paprocki <andrew ishiboo com>
- Cc: gtk-devel-list gnome org
- Subject: Re: gparamspecs.c param_double_validate() doesn't support NaN/Inf?
- Date: Fri, 09 Jan 2009 13:11:38 +0100
On Thu, 2009-01-08 at 16:46 -0500, Andrew Paprocki wrote:
> I have a GObject with a double property that I need to be able to set
> NaN to in certain circumstances. Right now, GObject prints out a
> warning when this is done because param_double_validate does not
> handle NaN/Inf explicitly.
> ** WARNING **: value "NaN" of type `gdouble' is invalid or out of
> range for property `foo' of type `gdouble'
> Should I patch GParamSpecDouble to have two :1 fields for 'allow_nan',
> 'allow_inf' and make param_double_validate do the correct thing with
I think you have a very good point here and that use case is entirely
Would you please file this as enhancement request against GObject?
An attached patch that follows the coding style nicely plus some
code to test the feature in gobject/tests will increase the
probability of this becoming committed significantly ;)
] [Thread Prev