summaryrefslogtreecommitdiff
path: root/av.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2016-08-24 13:57:56 +0100
committerDavid Mitchell <davem@iabyn.com>2016-08-24 13:57:56 +0100
commit8d168aaa014262c7f93944b76b84de99af3c5513 (patch)
tree4b3267cf864eb22fbeef67cd928f26e87449882e /av.c
parent91abb413c86e04a93ab807cac8a8d3ff68cbb345 (diff)
downloadperl-8d168aaa014262c7f93944b76b84de99af3c5513.tar.gz
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.
Diffstat (limited to 'av.c')
-rw-r--r--av.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/av.c b/av.c
index 21828a9254..e3c6d5a37c 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)