diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2014-09-12 09:23:00 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2014-09-12 09:23:00 +0100 |
commit | 46274848d6aaabeb050741bf2f17f08938a13e2d (patch) | |
tree | 2b09d068ccdfc1747e98a1b33a1903210577a010 /cpan | |
parent | 7a26eb46cb59ddb988d6e2c4ebc3fd6dd99ce499 (diff) | |
download | perl-46274848d6aaabeb050741bf2f17f08938a13e2d.tar.gz |
Scalar-List-Utils has been upgraded from version 1.40 to 1.41
This incorporates ca81d15134, which was naughtily not listed as a
CUSTOMIZED file.
Diffstat (limited to 'cpan')
-rw-r--r-- | cpan/Scalar-List-Utils/ListUtil.xs | 17 | ||||
-rw-r--r-- | cpan/Scalar-List-Utils/lib/List/Util.pm | 2 | ||||
-rw-r--r-- | cpan/Scalar-List-Utils/lib/List/Util/XS.pm | 2 | ||||
-rw-r--r-- | cpan/Scalar-List-Utils/lib/Scalar/Util.pm | 2 | ||||
-rw-r--r-- | cpan/Scalar-List-Utils/lib/Sub/Util.pm | 6 | ||||
-rw-r--r-- | cpan/Scalar-List-Utils/t/reduce.t | 5 |
6 files changed, 20 insertions, 14 deletions
diff --git a/cpan/Scalar-List-Utils/ListUtil.xs b/cpan/Scalar-List-Utils/ListUtil.xs index a21e848f02..515677f162 100644 --- a/cpan/Scalar-List-Utils/ListUtil.xs +++ b/cpan/Scalar-List-Utils/ListUtil.xs @@ -321,7 +321,7 @@ CODE: SAVESPTR(GvSV(agv)); SAVESPTR(GvSV(bgv)); GvSV(agv) = ret; - SvSetSV(ret, args[1]); + SvSetMagicSV(ret, args[1]); #ifdef dMULTICALL if(!CvISXSUB(cv)) { dMULTICALL; @@ -331,7 +331,7 @@ CODE: for(index = 2 ; index < items ; index++) { GvSV(bgv) = args[index]; MULTICALL; - SvSetSV(ret, *PL_stack_sp); + SvSetMagicSV(ret, *PL_stack_sp); } # ifdef PERL_HAS_BAD_MULTICALL_REFCOUNT if(CvDEPTH(multicall_cv) > 1) @@ -349,7 +349,7 @@ CODE: PUSHMARK(SP); call_sv((SV*)cv, G_SCALAR); - SvSetSV(ret, *PL_stack_sp); + SvSetMagicSV(ret, *PL_stack_sp); } } @@ -1196,16 +1196,17 @@ PPCODE: if (PL_DBsub && CvGV(cv)) { HV *hv = GvHV(PL_DBsub); - char* new_pkg = HvNAME(stash); + char *new_pkg = HvNAME(stash); - char* old_name = GvNAME( CvGV(cv) ); - char* old_pkg = HvNAME( GvSTASH(CvGV(cv)) ); + char *old_name = GvNAME( CvGV(cv) ); + char *old_pkg = HvNAME( GvSTASH(CvGV(cv)) ); int old_len = strlen(old_name) + strlen(old_pkg); int new_len = strlen(name) + strlen(new_pkg); - SV** old_data; - char* full_name; + SV **old_data; + char *full_name; + Newxz(full_name, (old_len > new_len ? old_len : new_len) + 3, char); strcat(full_name, old_pkg); diff --git a/cpan/Scalar-List-Utils/lib/List/Util.pm b/cpan/Scalar-List-Utils/lib/List/Util.pm index 9296221b15..837b6c89a2 100644 --- a/cpan/Scalar-List-Utils/lib/List/Util.pm +++ b/cpan/Scalar-List-Utils/lib/List/Util.pm @@ -14,7 +14,7 @@ our @EXPORT_OK = qw( all any first min max minstr maxstr none notall product reduce sum sum0 shuffle pairmap pairgrep pairfirst pairs pairkeys pairvalues ); -our $VERSION = "1.40"; +our $VERSION = "1.41"; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/cpan/Scalar-List-Utils/lib/List/Util/XS.pm b/cpan/Scalar-List-Utils/lib/List/Util/XS.pm index ad45203b7d..f2e01ae94b 100644 --- a/cpan/Scalar-List-Utils/lib/List/Util/XS.pm +++ b/cpan/Scalar-List-Utils/lib/List/Util/XS.pm @@ -2,7 +2,7 @@ package List::Util::XS; use strict; use List::Util; -our $VERSION = "1.40"; # FIXUP +our $VERSION = "1.41"; # FIXUP $VERSION = eval $VERSION; # FIXUP 1; diff --git a/cpan/Scalar-List-Utils/lib/Scalar/Util.pm b/cpan/Scalar-List-Utils/lib/Scalar/Util.pm index 043852a907..3f17d13b83 100644 --- a/cpan/Scalar-List-Utils/lib/Scalar/Util.pm +++ b/cpan/Scalar-List-Utils/lib/Scalar/Util.pm @@ -17,7 +17,7 @@ our @EXPORT_OK = qw( dualvar isdual isvstring looks_like_number openhandle readonly set_prototype tainted ); -our $VERSION = "1.40"; +our $VERSION = "1.41"; $VERSION = eval $VERSION; our @EXPORT_FAIL; diff --git a/cpan/Scalar-List-Utils/lib/Sub/Util.pm b/cpan/Scalar-List-Utils/lib/Sub/Util.pm index 6d03163c11..e40cf2205e 100644 --- a/cpan/Scalar-List-Utils/lib/Sub/Util.pm +++ b/cpan/Scalar-List-Utils/lib/Sub/Util.pm @@ -16,7 +16,7 @@ our @EXPORT_OK = qw( subname set_subname ); -our $VERSION = "1.40"; +our $VERSION = "1.41"; $VERSION = eval $VERSION; =head1 NAME @@ -25,7 +25,7 @@ Sub::Util - A selection of utility subroutines for subs and CODE references =head1 SYNOPSIS - use Sub::Util qw( set_prototype subname set_subname ); + use Sub::Util qw( prototype set_prototype subname set_subname ); =head1 DESCRIPTION @@ -47,6 +47,8 @@ that its popularity warrants inclusion in a core module, which this is. my $proto = prototype( $code ) +I<Since version 1.40.> + Returns the prototype of the given C<$code> reference, if it has one, as a string. This is the same as the C<CORE::prototype> operator; it is included here simply for symmetry and completeness with the other functions. diff --git a/cpan/Scalar-List-Utils/t/reduce.t b/cpan/Scalar-List-Utils/t/reduce.t index b8acbe7c57..848c34fb22 100644 --- a/cpan/Scalar-List-Utils/t/reduce.t +++ b/cpan/Scalar-List-Utils/t/reduce.t @@ -5,7 +5,7 @@ use warnings; use List::Util qw(reduce min); use Test::More; -plan tests => 29 + ($::PERL_ONLY ? 0 : 2); +plan tests => 30 + ($::PERL_ONLY ? 0 : 2); my $v = reduce {}; @@ -160,3 +160,6 @@ ok($@ =~ /^Not a subroutine reference/, 'check for code reference'); eval { &reduce(+{},1,2,3) }; ok($@ =~ /^Not a subroutine reference/, 'check for code reference'); +my @names = ("a\x{100}c", "d\x{101}efgh", 'ijk'); +my $longest = reduce { length($a) > length($b) ? $a : $b } @names; +is( length($longest), 6, 'missing SMG rt#121992'); |