summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2010-05-21 17:07:40 +0100
committerDavid Mitchell <davem@iabyn.com>2010-05-21 17:07:40 +0100
commited3b9b3c212f717939207379cdb328156dd4a01e (patch)
tree354c7d708fca92ba462cac40b28221ab29015dfc /pp.c
parent6f1401dc2acd2a2b85df22b0a74e5f7e6e0a33aa (diff)
downloadperl-ed3b9b3c212f717939207379cdb328156dd4a01e.tar.gz
followup to magic/overload fix
6f1401dc2acd2a2b85df22b0a74e5f7e6e0a33aa was over-enthusiastic on removing redundant code in the comparison ops. This code was only used on 64-bit #ifdef branches which is why I failed to spot it earlier. So restore that code!
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/pp.c b/pp.c
index b346026893..fa20914f70 100644
--- a/pp.c
+++ b/pp.c
@@ -1852,7 +1852,7 @@ PP(pp_lt)
#ifdef PERL_PRESERVE_IVUV
else
#endif
- if (SvROK(TOPs) && SvROK(TOPm1s)) {
+ if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
SP--;
SETs(boolSV(SvRV(TOPs) < SvRV(TOPp1s)));
RETURN;
@@ -1936,7 +1936,7 @@ PP(pp_gt)
#ifdef PERL_PRESERVE_IVUV
else
#endif
- if (SvROK(TOPs) && SvROK(TOPm1s)) {
+ if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
SP--;
SETs(boolSV(SvRV(TOPs) > SvRV(TOPp1s)));
RETURN;
@@ -2020,7 +2020,7 @@ PP(pp_le)
#ifdef PERL_PRESERVE_IVUV
else
#endif
- if (SvROK(TOPs) && SvROK(TOPm1s)) {
+ if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
SP--;
SETs(boolSV(SvRV(TOPs) <= SvRV(TOPp1s)));
RETURN;
@@ -2104,7 +2104,7 @@ PP(pp_ge)
#ifdef PERL_PRESERVE_IVUV
else
#endif
- if (SvROK(TOPs) && SvROK(TOPm1s)) {
+ if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
SP--;
SETs(boolSV(SvRV(TOPs) >= SvRV(TOPp1s)));
RETURN;
@@ -2129,7 +2129,7 @@ PP(pp_ne)
dVAR; dSP;
tryAMAGICbin_MG(ne_amg,AMGf_set);
#ifndef NV_PRESERVES_UV
- if (SvROK(TOPs) && SvROK(TOPm1s)) {
+ if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
SP--;
SETs(boolSV(SvRV(TOPs) != SvRV(TOPp1s)));
RETURN;
@@ -2206,7 +2206,7 @@ PP(pp_ncmp)
dVAR; dSP; dTARGET;
tryAMAGICbin_MG(ncmp_amg, 0);
#ifndef NV_PRESERVES_UV
- if (SvROK(TOPs) && SvROK(TOPm1s) ) {
+ if (SvROK(TOPs) && !SvAMAGIC(TOPs) && SvROK(TOPm1s) && !SvAMAGIC(TOPm1s)) {
const UV right = PTR2UV(SvRV(POPs));
const UV left = PTR2UV(SvRV(TOPs));
SETi((left > right) - (left < right));