develooper Front page | perl.perl5.porters | Postings from January 2017

Re: [perl.git] branch blead, updated. v5.25.9-63-g62a74c3704

Thread Next
From:
demerphq
Date:
January 29, 2017 16:47
Subject:
Re: [perl.git] branch blead, updated. v5.25.9-63-g62a74c3704
Message ID:
CANgJU+W7nvW7_yyfhU+_p6C0x0ttDdRE0cf1_OzPfATgjUX+Yw@mail.gmail.com
On 29 January 2017 at 16:17, Hugo Van der Sanden <hv@crypt.org> wrote:
> In perl.git, the branch blead has been updated
>
> <http://perl5.git.perl.org/perl.git/commitdiff/62a74c3704bd55cf2797db36535df425e3e0c675?hp=bc18b9df70cc60cdfa7dd6e64d25e960792a0bf3>
>
> - Log -----------------------------------------------------------------
> commit 62a74c3704bd55cf2797db36535df425e3e0c675
> Author: Hugo van der Sanden <hv@crypt.org>
> Date:   Sun Jan 29 15:10:02 2017 +0000
>
>     mention PASS2 in reginsert() example
>
>     As per bb78386f13.
> -----------------------------------------------------------------------
>
> Summary of changes:
>  regcomp.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/regcomp.c b/regcomp.c
> index 19ed866f84..0a315cbdbc 100644
> --- a/regcomp.c
> +++ b/regcomp.c
> @@ -18508,7 +18508,8 @@ S_reg2Lanode(pTHX_ RExC_state_t *pRExC_state, const U8 op, const U32 arg1, const
>  * set up NEXT_OFF() of the inserted node if needed. Something like this:
>  *
>  * reginsert(pRExC, OPFAIL, orig_emit, depth+1);
> -* NEXT_OFF(orig_emit)= regarglen[OPFAIL] + NODE_STEP_REGNODE;
> +* if (PASS2)
> +*     NEXT_OFF(orig_emit) = regarglen[OPFAIL] + NODE_STEP_REGNODE;
>  *
>  */
>  STATIC void

Do you think we should just change reginsert to do this automagically
based on a flag in the params?

So maybe add a flags field or something that allows us to to tell
reginsert "set up the NEXT_OFF please", which would then clean this
code up and allow us to not have to mention the PASS2 stuff?

Yves

-- 
perl -Mre=debug -e "/just|another|perl|hacker/"

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About