Re: [Re: Let's not use ... args]



> 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.
> > 

Havoc wrote:
> 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.

I'm sorry, I have no idea how that might help. For instance,
gnome_message_box_new() takes a variable argument which should be a series of
gchar* button names. Yes, I know now that there is a different version of
gnome_message_box_new which is easier to wrap.

Murray Cumming
murrayc usa net
www.murrayc.com

____________________________________________________________________
Get free email and a permanent address at http://www.netaddress.com/?N=1




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