summaryrefslogtreecommitdiff
path: root/pp_sort.c
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2009-09-27 14:42:11 +0200
committerRafael Garcia-Suarez <rgs@consttype.org>2009-09-27 14:42:11 +0200
commit93e19c0f634ff075d96380394c4e3449389368d8 (patch)
tree7a430f687af4320300fe628219042a91e1cb8570 /pp_sort.c
parent338584c0b1c948a967b5e2ecbb69c512410589e4 (diff)
downloadperl-93e19c0f634ff075d96380394c4e3449389368d8.tar.gz
[perl #69384] numericness failure in sorting
This patch removes the error "Sort subroutine didn't return a numeric value" and adds a regression test.
Diffstat (limited to 'pp_sort.c')
-rw-r--r--pp_sort.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/pp_sort.c b/pp_sort.c
index a27232f74b..4abec80ad4 100644
--- a/pp_sort.c
+++ b/pp_sort.c
@@ -1757,8 +1757,6 @@ S_sortcv(pTHX_ SV *const a, SV *const b)
CALLRUNOPS(aTHX);
if (PL_stack_sp != PL_stack_base + 1)
Perl_croak(aTHX_ "Sort subroutine didn't return single value");
- if (!SvNIOKp(*PL_stack_sp))
- Perl_croak(aTHX_ "Sort subroutine didn't return a numeric value");
result = SvIV(*PL_stack_sp);
while (PL_scopestack_ix > oldscopeix) {
LEAVE;
@@ -1799,8 +1797,6 @@ S_sortcv_stacked(pTHX_ SV *const a, SV *const b)
CALLRUNOPS(aTHX);
if (PL_stack_sp != PL_stack_base + 1)
Perl_croak(aTHX_ "Sort subroutine didn't return single value");
- if (!SvNIOKp(*PL_stack_sp))
- Perl_croak(aTHX_ "Sort subroutine didn't return a numeric value");
result = SvIV(*PL_stack_sp);
while (PL_scopestack_ix > oldscopeix) {
LEAVE;
@@ -1829,8 +1825,6 @@ S_sortcv_xsub(pTHX_ SV *const a, SV *const b)
(void)(*CvXSUB(cv))(aTHX_ cv);
if (PL_stack_sp != PL_stack_base + 1)
Perl_croak(aTHX_ "Sort subroutine didn't return single value");
- if (!SvNIOKp(*PL_stack_sp))
- Perl_croak(aTHX_ "Sort subroutine didn't return a numeric value");
result = SvIV(*PL_stack_sp);
while (PL_scopestack_ix > oldscopeix) {
LEAVE;