From c9612cb4a5ee19f5c24c8b9e3615e5f55881ed68 Mon Sep 17 00:00:00 2001 From: Chris 'BinGOs' Williams Date: Thu, 27 Dec 2012 21:49:23 +0000 Subject: [PATCH] Update Scalar-List-Utils to CPAN version 1.27 [DELTA] 1.26_001 -- Sun Dec 23 15:58 * Fix multicall refcount bug RT#80646 --- Porting/Maintainers.pl | 2 +- cpan/List-Util/Changes | 4 ++++ cpan/List-Util/ListUtil.xs | 16 ++++++++++++++++ cpan/List-Util/lib/List/Util.pm | 2 +- cpan/List-Util/lib/List/Util/XS.pm | 2 +- cpan/List-Util/lib/Scalar/Util.pm | 2 +- 6 files changed, 24 insertions(+), 4 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 5265b49..5058412 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1595,7 +1595,7 @@ use File::Glob qw(:case); 'Scalar-List-Utils' => { 'MAINTAINER' => 'gbarr', - 'DISTRIBUTION' => 'PEVANS/Scalar-List-Utils-1.26.tar.gz', + 'DISTRIBUTION' => 'PEVANS/Scalar-List-Utils-1.27.tar.gz', # Note that perl uses its own version of Makefile.PL 'FILES' => q[cpan/List-Util], diff --git a/cpan/List-Util/Changes b/cpan/List-Util/Changes index d390576..9ab9804 100644 --- a/cpan/List-Util/Changes +++ b/cpan/List-Util/Changes @@ -1,3 +1,7 @@ +1.26_001 -- Sun Dec 23 15:58 + + * Fix multicall refcount bug RT#80646 + 1.26 -- Sun Dec 16 19:39 * Merge patch from JDHEDDEN - Add Scalar::Util::isdual() RT#76150 diff --git a/cpan/List-Util/ListUtil.xs b/cpan/List-Util/ListUtil.xs index 93e415c..1ae74cd 100644 --- a/cpan/List-Util/ListUtil.xs +++ b/cpan/List-Util/ListUtil.xs @@ -58,6 +58,10 @@ my_sv_copypv(pTHX_ SV *const dsv, SV *const ssv) # define slu_sv_value(sv) (SvIOK(sv)) ? (NV)(SvIVX(sv)) : (SvNV(sv)) #endif +#if PERL_VERSION < 13 || (PERL_VERSION == 13 && PERL_SUBVERSION < 9) +# define PERL_HAS_BAD_MULTICALL_REFCOUNT +#endif + MODULE=List::Util PACKAGE=List::Util void @@ -252,6 +256,10 @@ CODE: MULTICALL; SvSetSV(ret, *PL_stack_sp); } +#ifdef PERL_HAS_BAD_MULTICALL_REFCOUNT + if (CvDEPTH(multicall_cv) > 1) + SvREFCNT_inc_simple_void_NN(multicall_cv); +#endif POP_MULTICALL; } else { @@ -300,11 +308,19 @@ CODE: GvSV(PL_defgv) = args[index]; MULTICALL; if (SvTRUEx(*PL_stack_sp)) { +#ifdef PERL_HAS_BAD_MULTICALL_REFCOUNT + if (CvDEPTH(multicall_cv) > 1) + SvREFCNT_inc_simple_void_NN(multicall_cv); +#endif POP_MULTICALL; ST(0) = ST(index); XSRETURN(1); } } +#ifdef PERL_HAS_BAD_MULTICALL_REFCOUNT + if (CvDEPTH(multicall_cv) > 1) + SvREFCNT_inc_simple_void_NN(multicall_cv); +#endif POP_MULTICALL; } else { diff --git a/cpan/List-Util/lib/List/Util.pm b/cpan/List-Util/lib/List/Util.pm index 39c4e7e..5988aa9 100644 --- a/cpan/List-Util/lib/List/Util.pm +++ b/cpan/List-Util/lib/List/Util.pm @@ -13,7 +13,7 @@ require Exporter; our @ISA = qw(Exporter); our @EXPORT_OK = qw(first min max minstr maxstr reduce sum sum0 shuffle); -our $VERSION = "1.26"; +our $VERSION = "1.27"; our $XS_VERSION = $VERSION; $VERSION = eval $VERSION; diff --git a/cpan/List-Util/lib/List/Util/XS.pm b/cpan/List-Util/lib/List/Util/XS.pm index 1fca3e4..01b944b 100644 --- a/cpan/List-Util/lib/List/Util/XS.pm +++ b/cpan/List-Util/lib/List/Util/XS.pm @@ -2,7 +2,7 @@ package List::Util::XS; use strict; use List::Util; -our $VERSION = "1.26"; # FIXUP +our $VERSION = "1.27"; # FIXUP $VERSION = eval $VERSION; # FIXUP 1; diff --git a/cpan/List-Util/lib/Scalar/Util.pm b/cpan/List-Util/lib/Scalar/Util.pm index b73f1e6..da22989 100644 --- a/cpan/List-Util/lib/Scalar/Util.pm +++ b/cpan/List-Util/lib/Scalar/Util.pm @@ -26,7 +26,7 @@ our @EXPORT_OK = qw( tainted weaken ); -our $VERSION = "1.26"; +our $VERSION = "1.27"; $VERSION = eval $VERSION; our @EXPORT_FAIL; -- 2.7.4