Re: Patch For Approval

On 12 Jan 2001, Owen Taylor wrote:

> Federico Mena Quintero <federico ximian com> writes:
> > Havoc Pennington <hp redhat com> writes:
> > 
> > > But it would be binary incompatible to change the value of
> > > G_PRIORITY_DEFAULT, so that won't happen, so there's no issue.
> > > 
> > > I mean, I don't really care if you apply the patch, I'm just saying I
> > > can't imagine it makes any difference. ;-)
> > 
> > The problem is that if I am reading the code I will see a zero.  Then
> > I have to go to the header file to find the prototype for that
> > function.  Then I have to figure out what a priority of zero means, by
> > looking at other code or trying to see if there are some constants.
> > 
> > Replacing it with G_PRIORITY_DEFAULT means I will see that
> > 
> > 	a) the parameter specifies a priority
> > 
> > 	b) it is indeed the default priority
> > 
> > by just glancing at the code.  I don't have to look at header files or
> > other code then, and it is obvious what it does.
> Federico,
> In the HEAD branch, it appears as G_PRIORITY_DEFAULT in the code.
> I don't know why you would read the code for gmain.c in the glib-1-2
> branch...

1.2.x code will be read for quite some time. in fact, most developers
prefer to read the code that they're developing against, rather than
some newer, unstable version thereof. in that consens, federicos argument
makes perfect sense, and i'm not quite sure how JP Rosevear could
have made the original patch submission without actually _reading_
1.2 code, since there's no functional difference in using 0 over
G_PRIORITY_DEFAULT that he could have run into.

dropping these kind of patches only makes sense if the code branch they
apply to is officially dead, like glib/gtk 1.0.x, but that's not the
case for 1.2.x so the patch deserves application. i wonder how we could
even argue that, the only thing that deserves special attention here is
that these kind of patches (even if they were submitted against 1.0.x)
get carried on into the development branch.

> In your own code, feel free to G_PRIORITY_DEFAULT. In fact, please
> Regards,
>                                         Owen


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