Re: [gnome-db] Patch for const removal



> On Tue, 2003-11-18 at 20:18, Paisa Seeluangsawat wrote:
>> > I don't understand why the const should be removed from all of the
>> > gda_value_*.
>>
>> Vivian, I don't understand why either :-P.  I completely agree with
>> your view.  You should have jumped out and helped me earlier when
>> Rodrigo mandated that...
>>
>> > those functions [gda_value_*] are wrong. As I said, all GNOME libs
>> > never use constas the object argument (object_whatever (Object
>> > *object...), so we shouldn't do the same.
>>
>> For more of these arguments leading to this patch see this thread,
>>
>>   http://mail.gnome.org/archives/gnome-db-list/2003-October/msg00113.html
>>
>>
>> And to Rodrigo...
>> >
>> > > - -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.
>> >
>> I was just carrying out your idea here.  Isn't GList one of your
>> "object_whatever"?  Didn't you say *all* GNOME libs never use const
>> objects?
>
> I never said such a thing. I said let's do it the GNOME way, which is to
> use const in only a few places where it's obvious. Obviously, our
> gda_value/gda_row stuff was suffering from the const problem, and this
> is why we even started talking about it. If it had been the perfect way,
> it would have remained as it was, but since it wasn't, we are changing
> it to match the rest of the APIs we use.
>
> It's not about "let's do it like the cool guys", but "let's fix it", and
> I think we all agree the const's in those files are wrong, even if it's
> the correct fix semantically speaking.
>
> cheers
>
>



All right, I had not followed that thread...

Thanks,

Vivien



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