Hello community,

here is the log from the commit of package perl-Scalar-List-Utils for 
openSUSE:Factory checked in at 2017-06-27 10:20:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Scalar-List-Utils (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Scalar-List-Utils.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Scalar-List-Utils"

Tue Jun 27 10:20:35 2017 rev:12 rq:506079 version:1.48

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/perl-Scalar-List-Utils/perl-Scalar-List-Utils.changes
    2017-01-15 11:11:14.892446993 +0100
+++ 
/work/SRC/openSUSE:Factory/.perl-Scalar-List-Utils.new/perl-Scalar-List-Utils.changes
       2017-06-27 10:20:36.404839363 +0200
@@ -1,0 +2,15 @@
+Sat Jun 24 06:19:49 UTC 2017 - co...@suse.com
+
+- updated to 1.48
+   see /usr/share/doc/packages/perl-Scalar-List-Utils/Changes
+
+  1.48 -- 2017/06/23 17:29:42
+       [CHANGES]
+        * Note in documentation that outer function's @_ can be accessed in
+          some blocks, but ought not be (thanks wchristian)
+  
+       [BUGFIXES]
+        * Ensure pairmap extends its stack correctly (thanks davem)
+        * Fix name of List::Util::unpairs in its error messages
+
+-------------------------------------------------------------------

Old:
----
  Scalar-List-Utils-1.47.tar.gz

New:
----
  Scalar-List-Utils-1.48.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Scalar-List-Utils.spec ++++++
--- /var/tmp/diff_new_pack.UEMkBx/_old  2017-06-27 10:20:37.024751747 +0200
+++ /var/tmp/diff_new_pack.UEMkBx/_new  2017-06-27 10:20:37.024751747 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package perl-Scalar-List-Utils
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,14 +17,14 @@
 
 
 Name:           perl-Scalar-List-Utils
-Version:        1.47
+Version:        1.48
 Release:        0
 %define cpan_name Scalar-List-Utils
 Summary:        Common Scalar and List utility subroutines
 License:        Artistic-1.0 or GPL-1.0+
 Group:          Development/Libraries/Perl
 Url:            http://search.cpan.org/dist/Scalar-List-Utils/
-Source0:        
http://www.cpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
+Source0:        
https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
 Source1:        cpanspec.yml
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildRequires:  perl

++++++ Scalar-List-Utils-1.47.tar.gz -> Scalar-List-Utils-1.48.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.47/Changes 
new/Scalar-List-Utils-1.48/Changes
--- old/Scalar-List-Utils-1.47/Changes  2016-12-22 19:57:50.000000000 +0100
+++ new/Scalar-List-Utils-1.48/Changes  2017-06-23 18:30:58.000000000 +0200
@@ -1,3 +1,12 @@
+1.48 -- 2017/06/23 17:29:42
+       [CHANGES]
+        * Note in documentation that outer function's @_ can be accessed in
+          some blocks, but ought not be (thanks wchristian)
+
+       [BUGFIXES]
+        * Ensure pairmap extends its stack correctly (thanks davem)
+        * Fix name of List::Util::unpairs in its error messages
+
 1.47 -- 2016/12/22 18:54:45
        [CHANGES]
         * Make XS code ppport.h-free when in core
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.47/ListUtil.xs 
new/Scalar-List-Utils-1.48/ListUtil.xs
--- old/Scalar-List-Utils-1.47/ListUtil.xs      2016-12-14 21:27:00.000000000 
+0100
+++ new/Scalar-List-Utils-1.48/ListUtil.xs      2017-06-23 18:26:18.000000000 
+0200
@@ -636,9 +636,9 @@
         SvGETMAGIC(pair);
 
         if(SvTYPE(pair) != SVt_RV)
-            croak("Not a reference at List::Util::unpack() argument %d", i);
+            croak("Not a reference at List::Util::unpairs() argument %d", i);
         if(SvTYPE(SvRV(pair)) != SVt_PVAV)
-            croak("Not an ARRAY reference at List::Util::unpack() argument 
%d", i);
+            croak("Not an ARRAY reference at List::Util::unpairs() argument 
%d", i);
 
         /* TODO: assert pair is an ARRAY ref */
         pairav = (AV *)SvRV(pair);
@@ -905,6 +905,7 @@
         SV **stack = PL_stack_base + ax;
         I32 ret_gimme = GIMME_V;
         int i;
+        AV *spill = NULL; /* accumulates results if too big for stack */
 
         dMULTICALL;
         I32 gimme = G_ARRAY;
@@ -914,41 +915,64 @@
         for(; argi < items; argi += 2) {
             int count;
 
-            GvSV(agv) = args_copy ? args_copy[argi] : stack[argi];
-            GvSV(bgv) = argi < items-1 ?
-                (args_copy ? args_copy[argi+1] : stack[argi+1]) :
-                &PL_sv_undef;
+            GvSV(agv) = stack[argi];
+            GvSV(bgv) = argi < items-1 ? stack[argi+1]: &PL_sv_undef;
 
             MULTICALL;
             count = PL_stack_sp - PL_stack_base;
 
-            if(count > 2 && !args_copy) {
+            if (count > 2 || spill) {
                 /* We can't return more than 2 results for a given input pair
-                 * without trashing the remaining argmuents on the stack still
-                 * to be processed. So, we'll copy them out to a temporary
-                 * buffer and work from there instead.
+                 * without trashing the remaining arguments on the stack still
+                 * to be processed, or possibly overrunning the stack end.
+                 * So, we'll accumulate the results in a temporary buffer
+                 * instead.
                  * We didn't do this initially because in the common case, most
                  * code blocks will return only 1 or 2 items so it won't be
                  * necessary
                  */
-                int n_args = items - argi;
-                Newx(args_copy, n_args, SV *);
-                SAVEFREEPV(args_copy);
+                int fill;
 
-                Copy(stack + argi, args_copy, n_args, SV *);
+                if (!spill) {
+                    spill = newAV();
+                    AvREAL_off(spill); /* don't ref count its contents */
+                    /* can't mortalize here as every nextstate in the code
+                     * block frees temps */
+                    SAVEFREESV(spill);
+                }
 
-                argi = 0;
-                items = n_args;
+                fill = (int)AvFILL(spill);
+                av_extend(spill, fill + count);
+                for(i = 0; i < count; i++)
+                    (void)av_store(spill, ++fill,
+                                    newSVsv(PL_stack_base[i + 1]));
             }
-
-            for(i = 0; i < count; i++)
-                stack[reti++] = newSVsv(PL_stack_sp[i - count + 1]);
+            else
+                for(i = 0; i < count; i++)
+                    stack[reti++] = newSVsv(PL_stack_base[i + 1]);
         }
+
+        if (spill)
+            /* the POP_MULTICALL will trigger the SAVEFREESV above;
+             * keep it alive  it on the temps stack instead */
+            SvREFCNT_inc_simple_void_NN(spill);
+            sv_2mortal((SV*)spill);
+
         POP_MULTICALL;
 
+        if (spill) {
+            int n = (int)AvFILL(spill) + 1;
+            SP = &ST(reti - 1);
+            EXTEND(SP, n);
+            for (i = 0; i < n; i++)
+                *++SP = *av_fetch(spill, i, FALSE);
+            reti += n;
+            av_clear(spill);
+        }
+
         if(ret_gimme == G_ARRAY)
             for(i = 0; i < reti; i++)
-                sv_2mortal(stack[i]);
+                sv_2mortal(ST(i));
     }
     else
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.47/META.json 
new/Scalar-List-Utils-1.48/META.json
--- old/Scalar-List-Utils-1.47/META.json        2016-12-22 19:59:22.000000000 
+0100
+++ new/Scalar-List-Utils-1.48/META.json        2017-06-23 18:32:10.000000000 
+0200
@@ -49,6 +49,6 @@
          "web" : "https://github.com/Scalar-List-Utils/Scalar-List-Utils";
       }
    },
-   "version" : "1.47",
+   "version" : "1.48",
    "x_serialization_backend" : "JSON::PP version 2.27300_01"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.47/META.yml 
new/Scalar-List-Utils-1.48/META.yml
--- old/Scalar-List-Utils-1.47/META.yml 2016-12-22 19:59:22.000000000 +0100
+++ new/Scalar-List-Utils-1.48/META.yml 2017-06-23 18:32:10.000000000 +0200
@@ -23,5 +23,5 @@
 resources:
   bugtracker: 
https://rt.cpan.org/Public/Dist/Display.html?Name=Scalar-List-Utils
   repository: https://github.com/Scalar-List-Utils/Scalar-List-Utils.git
-version: '1.47'
+version: '1.48'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.47/lib/List/Util/XS.pm 
new/Scalar-List-Utils-1.48/lib/List/Util/XS.pm
--- old/Scalar-List-Utils-1.47/lib/List/Util/XS.pm      2016-12-22 
19:54:12.000000000 +0100
+++ new/Scalar-List-Utils-1.48/lib/List/Util/XS.pm      2017-06-23 
18:28:54.000000000 +0200
@@ -3,7 +3,7 @@
 use warnings;
 use List::Util;
 
-our $VERSION = "1.47";       # FIXUP
+our $VERSION = "1.48";       # FIXUP
 $VERSION = eval $VERSION;    # FIXUP
 
 1;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.47/lib/List/Util.pm 
new/Scalar-List-Utils-1.48/lib/List/Util.pm
--- old/Scalar-List-Utils-1.47/lib/List/Util.pm 2016-12-22 19:54:12.000000000 
+0100
+++ new/Scalar-List-Utils-1.48/lib/List/Util.pm 2017-06-23 18:28:54.000000000 
+0200
@@ -15,7 +15,7 @@
   all any first min max minstr maxstr none notall product reduce sum sum0 
shuffle uniq uniqnum uniqstr
   pairs unpairs pairkeys pairvalues pairmap pairgrep pairfirst
 );
-our $VERSION    = "1.47";
+our $VERSION    = "1.48";
 our $XS_VERSION = $VERSION;
 $VERSION    = eval $VERSION;
 
@@ -149,6 +149,9 @@
         # at least one string has more than 10 characters
     }
 
+Note: Due to XS issues the block passed may be able to access the outer @_
+directly. This is not intentional and will break under debugger.
+
 =head2 all
 
     my $bool = all { BLOCK } @list;
@@ -160,6 +163,9 @@
 false. If the C<BLOCK> never returns false or the C<@list> was empty then it
 returns true.
 
+Note: Due to XS issues the block passed may be able to access the outer @_
+directly. This is not intentional and will break under debugger.
+
 =head2 none
 
 =head2 notall
@@ -174,6 +180,9 @@
 returns true only if no value in the C<@list> causes the C<BLOCK> to return
 true, and C<notall> returns true only if not all of the values do.
 
+Note: Due to XS issues the block passed may be able to access the outer @_
+directly. This is not intentional and will break under debugger.
+
 =head2 first
 
     my $val = first { BLOCK } @list;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.47/lib/Scalar/Util.pm 
new/Scalar-List-Utils-1.48/lib/Scalar/Util.pm
--- old/Scalar-List-Utils-1.47/lib/Scalar/Util.pm       2016-12-22 
19:54:12.000000000 +0100
+++ new/Scalar-List-Utils-1.48/lib/Scalar/Util.pm       2017-06-23 
18:28:54.000000000 +0200
@@ -17,7 +17,7 @@
   dualvar isdual isvstring looks_like_number openhandle readonly set_prototype
   tainted
 );
-our $VERSION    = "1.47";
+our $VERSION    = "1.48";
 $VERSION   = eval $VERSION;
 
 require List::Util; # List::Util loads the XS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.47/lib/Sub/Util.pm 
new/Scalar-List-Utils-1.48/lib/Sub/Util.pm
--- old/Scalar-List-Utils-1.47/lib/Sub/Util.pm  2016-12-22 19:54:12.000000000 
+0100
+++ new/Scalar-List-Utils-1.48/lib/Sub/Util.pm  2017-06-23 18:28:54.000000000 
+0200
@@ -15,7 +15,7 @@
   subname set_subname
 );
 
-our $VERSION    = "1.47";
+our $VERSION    = "1.48";
 $VERSION   = eval $VERSION;
 
 require List::Util; # as it has the XS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Scalar-List-Utils-1.47/t/pair.t 
new/Scalar-List-Utils-1.48/t/pair.t
--- old/Scalar-List-Utils-1.47/t/pair.t 2016-12-22 19:54:12.000000000 +0100
+++ new/Scalar-List-Utils-1.48/t/pair.t 2017-06-23 18:28:54.000000000 +0200
@@ -3,7 +3,7 @@
 use strict;
 use warnings;
 
-use Test::More tests => 26;
+use Test::More tests => 27;
 use List::Util qw(pairgrep pairfirst pairmap pairs unpairs pairkeys 
pairvalues);
 
 no warnings 'misc'; # avoid "Odd number of elements" warnings most of the time
@@ -82,6 +82,16 @@
            [ "one=1", "two=2", "three=3" ],
            'pairmap copes with stack movement' );
 
+{
+    # do the pairmap and is_deeply as two separate statements to avoid
+    # the stack being extended before pairmap is called
+    my @a = pairmap { $a .. $b }
+                        1 => 3, 4 => 4, 5 => 6, 7 => 1998, 1999 => 2000;
+    my @exp; push @exp, $_ for 1..2000;
+    is_deeply( \@a, \@exp,
+           'pairmap result has more elements than input' );
+}
+
 is_deeply( [ pairs one => 1, two => 2, three => 3 ],
            [ [ one => 1 ], [ two => 2 ], [ three => 3 ] ],
            'pairs' );


Reply via email to