summaryrefslogtreecommitdiff
path: root/pp.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-04-06 12:40:44 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-04-06 12:40:44 -0700
commite62ca0f9ce708db51e000573ffdc696e61eabdf7 (patch)
tree3acfdc467d09212e728a5d0f261df342f6a80f2f /pp.h
parent9b029393566c62b805459ea132fb68e5e941a3bd (diff)
downloadperl-e62ca0f9ce708db51e000573ffdc696e61eabdf7.tar.gz
[perl #87708] $tied + $tied and $tied - $tied under ‘use integer’
This is just part of #87708. This fixes + and - under ‘use integer’ when the same tied scalar is used for both operands and returns two different values. Before this commit, get-magic would be called only once and the same value used. In 5.12.x + just worked but the operands were swapped for -.
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp.h b/pp.h
index e676e045b5..80ebfe6bc0 100644
--- a/pp.h
+++ b/pp.h
@@ -355,9 +355,10 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
SV *leftsv = CAT2(X,s); \
IV left = USE_LEFT(leftsv) ? SvIV(leftsv) : 0
#define dPOPXiirl_ul_nomg(X) \
- IV right = POPi; \
+ SV *rightsv = POPs; \
SV *leftsv = CAT2(X,s); \
- IV left = USE_LEFT(leftsv) ? SvIV_nomg(leftsv) : 0
+ IV left = USE_LEFT(leftsv) ? SvIV_nomg(leftsv) : 0; \
+ IV right = SvIV(rightsv)
#define dPOPPOPssrl dPOPXssrl(POP)
#define dPOPPOPnnrl dPOPXnnrl(POP)