summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index a79a1d4cb2..769b505277 100644
--- a/pp.c
+++ b/pp.c
@@ -1714,6 +1714,12 @@ PP(pp_ge)
PP(pp_ne)
{
dSP; tryAMAGICbinSET(ne,0);
+#ifndef NV_PRESERVES_UV
+ if (SvROK(TOPs) && SvROK(TOPm1s)) {
+ SETi(PTR2UV(SvRV(TOPs)) - PTR2UV(SvRV(TOPm1s)));
+ RETURN;
+ }
+#endif
#ifdef PERL_PRESERVE_IVUV
SvIV_please(TOPs);
if (SvIOK(TOPs)) {