Re: [gnome-db] gda_data_model_update_row syntax



> I've been thinking that the best thing would be probably to remove the
> const in all those functions, and clearly specify, in the API
> documentation, which values CANNOT be freed by the caller. That would
> remove all this cruft we've got because of those 'const'.

Could you expound on how this is better than using 'const' to
distinguish updateable/non-updatable?  I see 'const' not as a cruft,
but a clean and clear way to tell user that the value is not to be
changed.


> So, either we add code to the library to prevent changing the values, or
> return copies of the values to the caller.

Returning 'const' in non-updatable row/values is already like shouting
at the user, "If you update this, bad things will happen."  Isn't that
enough?




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