Re: Let's not use ... args
- From: Havoc Pennington <hp redhat com>
- To: Murray Cumming <murrayc usa net>
- Cc: gnome-devel-list gnome org
- Subject: Re: Let's not use ... args
- Date: 30 Jan 2001 10:05:30 -0500
Murray Cumming <murrayc usa net> writes:
> I've noticed that GnomeMessageBox and the GnomeCanvas items use ... arguments.
> Not only does this make for an unclear and un-typed API, it is also impossible
> to wrap properly in some language bindings, because it is not possible to
> build the variable argument structure dynamically.
>
It's easy to wrap, just do this:
void
set_whatever (thetype whatever)
{
gtk_object_set (object, "whatever", whatever, NULL);
}
You can autogenerate that by querying the arg list on the object even.
For dynamic languages you can autogenerate it at runtime.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]