Re: [gnome-db] Minor API change and MySQL [update/delete]_row
- From: Steve Fosdick <lists pelvoux nildram co uk>
- To: GDA <gnome-db-list gnome org>
- Subject: Re: [gnome-db] Minor API change and MySQL [update/delete]_row
- Date: Wed, 29 Oct 2003 00:28:18 +0000
On 2003.10.27 20:09, Rodrigo Moya wrote:
Paisa Seeluangsawat <paisa unt edu> wrote:
> GdaDataModel *
> -gda_row_get_model (GdaRow *row)
> +gda_row_get_model (const GdaRow *row)
> {
>
hmm, again, this looks bad to me. I know it's not easy to come up
with a good const/non-const setting, but this totally breaks GNOME
standards.
You've got always, in other GNOME libs, the first argument being the
class object, with no const. Doing this now breaks that standard.
Am I missing something here? AFAIK, if a function is declared to take
a const pointer and you have a pointer to a writable object the
compiler is quite happy to pass the pointer to the function and doesn't
generate any warnings. As long as the function doesn't try to modify
the object pointed to then all works nicely.
The problem is more likely to occur inside the function when it tries
to pass the pointer along to another function that doesn't have the
const declaration.
Steve.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]