Re: [gnome-db] nitpick: gda_stringify: why parameter not const



On Tue, 2004-11-09 at 20:43 -0700, Neil Zanella wrote:
> Hello,
> 
> const GdaValue* gda_data_model_get_value_at (GdaDataModel *model,
>                                              gint col,
>                                              gint row);
> 
> returns a const pointer. So could you please declare:
> 
> gda_value_stringify (GdaValue *value);
> 
> as:
> 
> gda_value_stringify (const GdaValue *value);
> 
> That way I can compose the two in one line without a cast.
> 
> Const is an all or nothing thing...
> 
right, we removed a lot of cont's some time ago, because it makes no
sense to use const GdaValue for the first parameter in all gda_value_
functions. GLib/GTK functions never take that const, so gda_value_
neither does it.

The thing here is if we really should return const in
gda_data_model_get_value_at.
-- 
Rodrigo Moya <rodrigo gnome-db org>



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