diff options
author | Nicholas Clark <nick@ccl4.org> | 2001-11-20 21:59:51 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-11-21 00:40:09 +0000 |
commit | e61d22efbb00a7fa2de05bf2c594ec3b6f671baf (patch) | |
tree | 8af835f85dda1bc7fd9f6e1627e6b47d928be746 /pp.c | |
parent | 9124316ee7cc50a30161a176ef51b0432a068a78 (diff) | |
download | perl-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.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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 |