Re: [gnome-db] nitpick: gda_stringify: why parameter not const
- From: Neil Zanella <nzanella gmail com>
- To: GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] nitpick: gda_stringify: why parameter not const
- Date: Wed, 10 Nov 2004 10:09:53 -0700
On Wed, 10 Nov 2004 13:13:59 +0100, Rodrigo Moya <rodrigo gnome-db org> wrote:
> 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.
OK, I'll just wait for the fix.
I remember having to do the same with some of my code once.
Those consts can be a real nuisance.
Neil
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]