Re: [gnome-db] Patch for const removal



On Tue, 2003-11-18 at 05:54, Paisa Seeluangsawat wrote:
> Hi,
> 
> I've tried to send in this patch a few times since Sunday and it never
> got through the list.  The patch is at the link,
> 
>   http://physics.colorado.edu/~paisa/gda.txt
> 
> - -const GList *
> +GList *
>  gda_connection_get_errors (GdaConnection *cnc)
>  {
>  	g_return_val_if_fail (GDA_IS_CONNECTION (cnc), NULL);
>
this function should maintain the const, since what is returned is a
private copy.

> - -static const GdaRow *
> - -gda_data_model_array_append_row (GdaDataModel *model, const GList *values)
> +static GdaRow *
> +gda_data_model_array_append_row (GdaDataModel *model, GList *values)
>
here, also maintain the const on the 'values' argument, since we
really want to specify the list wont be used by the model.
The same for all append_row functions in all models.

Also, on the gda_value_new... functions, keep the const for the argument
also. I think it's better to keep it there. The same for the gda_value_get...
and gda_value_set... functions.

Please fix that, the rest is ok.

cheers




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