Re: GtkArg typesafety
- From: Havoc Pennington <hp redhat com>
- To: George <jirka 5z com>
- Cc: gnome-devel-list gnome org
- Subject: Re: GtkArg typesafety
- Date: 04 Jan 2000 12:02:05 -0500
George <jirka@5z.com> writes:
> #define MY_PERSON_ARG_NAME(arg) "name",(gpointer)(arg)
> #define MY_PERSON_GET_ARG_NAME(arg) "name",(gpointer *)(arg)
> #define MY_PERSON_ARG_DOB(arg) "dob",(glong)(arg)
> #define MY_PERSON_GET_ARG_DOB(arg) "dob",(glong *)(arg)
> #define MY_PERSON_ARG_DOD(arg) "dod",(glong)(arg)
> #define MY_PERSON_GET_ARG_DOD(arg) "dod",(glong *)(arg)
>
IMO this is much extra complexity for very little gain (it avoids the
"0" is not a double problem, but that's all really; it doesn't solve
the problem of passing entirely the wrong type or getting const-ness
wrong). And it ruins the nice syntax which is 85% of the point of
arguments.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]