Re: PATCH: add second argument to GWeakNotify



Tim Janik <timj gtk org> writes:

> On Fri, 17 Aug 2001, James Henstridge wrote:
> 
> > Here is a patch that adds the second argument to the weak reference
> > notifier prototype, as discussed on the list.
> > 
> > The patch adds the object pointer as the second argument, rather than
> > first in order to keep compatibility.  I didn't hide the second argument,
> > as Tim suggested, as it feels a bit messy (IMHO).  The final argument
> > order and whether the GObject* argument is shown in the headers are up to
> > Tim and Owen though.
> > 
> > Is it okay to check this in?
> 
> as far as i'm concerned, you can commit this if you stay with
> typedef void (*GWeakNotify)            (gpointer      data);
> for the public API and just add the object internally.
> this patch requires doc updates also though.

I agree with James and Jonathan - "hiding" the second argument
is just ugly. I don't think forcing people to look at docs
is an excuse for making interfaces confusing.

The naming 'where_the_object_was' is a pretty good red flag
already ...

I'd much rather see this committed the way James has written it.

And yes, we do need docs.

Regards,
                                        Owen




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