Re: [gnome-db] Patch for const removal
- From: Rodrigo Moya <rodrigo gnome-db org>
- To: Paisa Seeluangsawat <paisa unt edu>
- Cc: malerba gnome-db org, GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Patch for const removal
- Date: Fri, 21 Nov 2003 17:14:45 +0100
On Thu, 2003-11-20 at 18:36, Paisa Seeluangsawat wrote:
> > > And you haven't answered my question. Buying into your "no const"
> > > argument, why shouldn't I remove const from GList?
> >
> > because in that special case it seems to make sense.
>
> Could you explain so it make sense to me too?
>
IIRC that is for the gda_data_model_append_row, right? If so:
gda_data_model_append_row (model, const GList *value_list)
explicitly states that the value list is going to be read by the data
model implementation and forget about it. Whereas:
gda_data_model_append_row (model, GList *value_list)
can be thought as of "the value_list is kept by the model", which is not
what we want. In this special case, since it doesn't impose other
problems, it makes perfect sense to force the user to cast to (const
GList *) the value passed to this function.
As you can see this is just one function, a special case. The whole
const-ness in GdaRow/GdaValue made the code contain hundreds of casts,
which is, again, not what we want.
cheers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]