Extend the SvROK() testing also to pp_ne(), pointed out by
Jarkko Hietaniemi [Wed, 28 Mar 2001 14:21:00 +0000 (14:21 +0000)]
Andreas Schwab.

p4raw-id: //depot/perl@9399

pp.c

diff --git a/pp.c b/pp.c
index a79a1d4..769b505 100644 (file)
--- 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)) {