summaryrefslogtreecommitdiff
path: root/pp.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-26 21:47:03 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-26 21:47:03 +0000
commitd8c7644ed9d0c74a190f456cd50d7fe4d4ff120c (patch)
treebe236645138af851663ef0836bb15062c32f94b8 /pp.c
parentdc0d0a5f1eb5d299294348324bac49576ae83607 (diff)
downloadperl-d8c7644ed9d0c74a190f456cd50d7fe4d4ff120c.tar.gz
Treat pp_ncmp() and pp_scmp() as in #9366 (ROK).
TODO1: perlbench. TODO2: le, lt, ge, gt? Yech. p4raw-id: //depot/perl@9368
Diffstat (limited to 'pp.c')
-rw-r--r--pp.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/pp.c b/pp.c
index c40efef0dc..337242868b 100644
--- a/pp.c
+++ b/pp.c
@@ -1784,6 +1784,12 @@ PP(pp_ne)
PP(pp_ncmp)
{
dSP; dTARGET; tryAMAGICbin(ncmp,0);
+#ifndef NV_PRESERVES_UV
+ if (SvROK(TOPs) && SvROK(TOPm1s)) {
+ SETs(boolSV(SvRV(TOPs) == SvRV(TOPm1s)));
+ RETURN;
+ }
+#endif
#ifdef PERL_PRESERVE_IVUV
/* Fortunately it seems NaN isn't IOK */
SvIV_please(TOPs);
@@ -1964,6 +1970,12 @@ PP(pp_sne)
PP(pp_scmp)
{
dSP; dTARGET; tryAMAGICbin(scmp,0);
+#ifndef NV_PRESERVES_UV
+ if (SvROK(TOPs) && SvROK(TOPm1s)) {
+ SETs(boolSV(SvRV(TOPs) == SvRV(TOPm1s)));
+ RETURN;
+ }
+#endif
{
dPOPTOPssrl;
int cmp = ((PL_op->op_private & OPpLOCALE)