summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1997-01-24 21:25:01 +1200
committerChip Salzenberg <chip@atlantic.net>1997-01-25 15:58:00 +1200
commit9f8d30d514938e706a878aae5fd5b902550604e2 (patch)
tree722614cd7d771710cbee665b8daf4ed08461c21b
parentd83aa01ca04619f3fd5729b7be297347260be5d6 (diff)
downloadperl-9f8d30d514938e706a878aae5fd5b902550604e2.tar.gz
When sorting, promote to PVNV only for built-in comparison
-rw-r--r--pp_ctl.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 0d9a8cb309..58ab34ccda 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -612,10 +612,9 @@ PP(pp_sort)
while (MARK < SP) { /* This may or may not shift down one here. */
/*SUPPRESS 560*/
if (*up = *++MARK) { /* Weed out nulls. */
- if (!SvPOK(*up))
+ SvTEMP_off(*up);
+ if (!sortcop && !SvPOK(*up))
(void)sv_2pv(*up, &na);
- else
- SvTEMP_off(*up);
up++;
}
}