summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2001-11-20 21:59:51 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-11-21 00:40:09 +0000
commite61d22efbb00a7fa2de05bf2c594ec3b6f671baf (patch)
tree8af835f85dda1bc7fd9f6e1627e6b47d928be746 /pp.c
parent9124316ee7cc50a30161a176ef51b0432a068a78 (diff)
downloadperl-e61d22efbb00a7fa2de05bf2c594ec3b6f671baf.tar.gz
spaceship and refs
Message-ID: <20011120215951.U62891@plum.flirble.org> p4raw-id: //depot/perl@13147
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/pp.c b/pp.c
index 9407fd47cd..e4354eabf3 100644
--- a/pp.c
+++ b/pp.c
@@ -1759,7 +1759,8 @@ PP(pp_ne)
dSP; tryAMAGICbinSET(ne,0);
#ifndef NV_PRESERVES_UV
if (SvROK(TOPs) && SvROK(TOPm1s)) {
- SETs(boolSV(SvRV(TOPs) != SvRV(TOPm1s)));
+ SP--;
+ SETs(boolSV(SvRV(TOPs) != SvRV(TOPp1s)));
RETURN;
}
#endif
@@ -1830,7 +1831,9 @@ PP(pp_ncmp)
dSP; dTARGET; tryAMAGICbin(ncmp,0);
#ifndef NV_PRESERVES_UV
if (SvROK(TOPs) && SvROK(TOPm1s)) {
- SETi(PTR2UV(SvRV(TOPs)) - PTR2UV(SvRV(TOPm1s)));
+ UV right = PTR2UV(SvRV(POPs));
+ UV left = PTR2UV(SvRV(TOPs));
+ SETi((left > right) - (left < right));
RETURN;
}
#endif