summaryrefslogtreecommitdiff
path: root/pp.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-04-06 13:04:26 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-04-06 13:04:26 -0700
commit96b6b87fc202a490b35ba140684083e484959f72 (patch)
tree009643ca7cb001dee3ebb556be70f61eb298cfaa /pp.h
parente62ca0f9ce708db51e000573ffdc696e61eabdf7 (diff)
downloadperl-96b6b87fc202a490b35ba140684083e484959f72.tar.gz
[perl #87708] $tied % $tied and $tied * $tied under use integer
This is just part of #87708. This fixes the % and * operators under ‘use integer’ when the same tied scalar is used for both operands and returns two different val- ues. 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 %. It turns out that every operator using the dPOPTOPiirl_nomg macro needs exactly the same treatment, so this commit eliminates the dPOPTOPiirl_halfmg macro added a few commits ago and modifies dPOPTOPiirl_nomg to do was it was doing. This should be perfectly safe, as dPOPTOPiirl_nomg has not been in a stable release (and is only for internal use anyway).
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/pp.h b/pp.h
index 80ebfe6bc0..7ae6afa2ca 100644
--- a/pp.h
+++ b/pp.h
@@ -380,12 +380,8 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
#define dPOPTOPiirl_ul dPOPXiirl_ul(TOP)
#define dPOPTOPiirl_ul_nomg dPOPXiirl_ul_nomg(TOP)
#define dPOPTOPiirl_nomg \
- IV right = SvIV_nomg(TOPs); IV left = (sp--, SvIV_nomg(TOPs))
-#ifdef PERL_CORE
-# define dPOPTOPiirl_halfmg \
IV left = SvIV_nomg(TOPm1s); \
IV right = (sp--, TOPp1s == TOPs ? SvIV(TOPs) : SvIV_nomg(TOPp1s))
-#endif
#define RETPUSHYES RETURNX(PUSHs(&PL_sv_yes))
#define RETPUSHNO RETURNX(PUSHs(&PL_sv_no))