automake-patches
[Top][All Lists]
Advanced

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

Re: PATCH: Simplify a few loops in lib/Automake


From: Alexandre Duret-Lutz
Subject: Re: PATCH: Simplify a few loops in lib/Automake
Date: Wed, 13 Aug 2003 01:04:45 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Does anybody knows how to tell Gnus to quote attachments?  Each
time I want to comment a patch which is attached to a play I've
to play copy/paste.

>>> "Hari" == Raja R Harinath <address@hidden> writes:

 Hari> Hi,
 Hari> A few of the 'foreach' loops are simple enough that they can be
 Hari> replaced with one-liner 'map's or 'grep's.

 Hari> Ok to apply?

Sure!  

Personally it takes me more time to understand a map statement
such as the one you put in sub_conditions than its equivalent
for loop, though.  But well, I guess I have to fix my brain :)

[...]

| --- lib/Automake/Rule.pm      12 Aug 2003 22:33:44 -0000      1.2
| +++ lib/Automake/Rule.pm      12 Aug 2003 22:34:31 -0000
| @@ -740,11 +740,8 @@ sub define ($$$$$)
|         # was already defined in condition COND1 and we want to define
|         # it in condition TRUE, then define it only in condition !COND1.
|         # (See cond14.test and cond15.test for some test cases.)
| -       @conds = ();
| -       for my $undefined_cond ($rule->conditions->invert->conds)
| -         {
| -           push @conds, $cond->merge ($undefined_cond);
| -         }
| +       @conds = $rule->not_always_defined_in_cond ($cond)->conds;

Nifty!
-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]