diff options
author | Zefram <zefram@fysh.org> | 2009-09-27 14:42:11 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgs@consttype.org> | 2009-09-27 14:42:11 +0200 |
commit | 93e19c0f634ff075d96380394c4e3449389368d8 (patch) | |
tree | 7a430f687af4320300fe628219042a91e1cb8570 /pp_sort.c | |
parent | 338584c0b1c948a967b5e2ecbb69c512410589e4 (diff) | |
download | perl-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.c | 6 |
1 files changed, 0 insertions, 6 deletions
@@ -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; |