summaryrefslogtreecommitdiff
path: root/pp.h
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2011-04-05 22:30:16 -0700
committerFather Chrysostomos <sprout@cpan.org>2011-04-06 06:09:27 -0700
commit4cdd48d8aacaf1f4775166dabd4fab9452b1e91a (patch)
treefcf9f9d7e2053b2b6460157786059da6c6a6997f /pp.h
parentd4b629d054c4d4673eb40198700efd5b01407cb7 (diff)
downloadperl-4cdd48d8aacaf1f4775166dabd4fab9452b1e91a.tar.gz
[perl #87708] use integer; $tied <=> $tied
This is just part of #87708. This fixes <=> under ‘use integer’ when the same tied scalar is used for both operands and returns two different values. Before this com- mit, get-magic would be called only once and the same value used. In 5.12.x, the operands would be reversed.
Diffstat (limited to 'pp.h')
-rw-r--r--pp.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/pp.h b/pp.h
index eef6a0b806..e676e045b5 100644
--- a/pp.h
+++ b/pp.h
@@ -380,6 +380,11 @@ Does not use C<TARG>. See also C<XPUSHu>, C<mPUSHu> and C<PUSHu>.
#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))