develooper Front page | perl.perl5.porters | Postings from September 2016

Re: [perl #128989] Bleadperl v5.25.3-266-g1d7e644 breaksVPIT/Variable-Magic-0.59.tar.gz

Thread Previous | Thread Next
From:
perl
Date:
September 6, 2016 22:36
Subject:
Re: [perl #128989] Bleadperl v5.25.3-266-g1d7e644 breaksVPIT/Variable-Magic-0.59.tar.gz
Message ID:
2f3341e9-abb0-fed7-47c1-73b8f2542546@profvince.com

>
> commit 8d168aaa014262c7f93944b76b84de99af3c5513
> Author:     David Mitchell <davem@iabyn.com>
> AuthorDate: Wed Aug 24 13:57:56 2016 +0100
> Commit:     David Mitchell <davem@iabyn.com>
> CommitDate: Wed Aug 24 13:57:56 2016 +0100
>
>     tmp fix for Bleadperl breaks Variable-Magic
>
>     RT #128989
>
>     Prior to my commit v5.25.3-266-g1d7e644, in the absence of the SVs_RMG
>     flag, av_fetch() used AvFILL() for -ve keys and AvFILLp() for positive
>     keys. That commit changed it so they both use AvFILLp. This has broken
>     Variable::Magic 0.59.
>
>     As an interim measure, restore the old behaviour.
>
>
> Affected files ...
>     M	av.c
>
> Differences ...
>
> diff --git a/av.c b/av.c
> index 21828a9..e3c6d5a 100644
> --- a/av.c
> +++ b/av.c
> @@ -272,7 +272,8 @@ Perl_av_fetch(pTHX_ AV *av, SSize_t key, I32 lval)
>      }
>
>      neg  = (key < 0);
> -    size = AvFILLp(av) + 1;
> +    /* XXX tmp restore old behaviour to make Variable::Magic pass */
> +    size = (neg ? AvFILL(av): AvFILLp(av)) + 1;
>      key += neg * size; /* handle negative index without using branch */
>
>      /* the cast from SSize_t to Size_t allows both (key < 0) and (key >= size)
>
>

I've released version 0.60 that skips the test, so you can revert your 
revert if you want.


Vincent

Thread Previous | 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