Hello community,
here is the log from the commit of package perl-Syntax-Keyword-Try for
openSUSE:Factory checked in at 2019-09-09 23:53:18
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Syntax-Keyword-Try (Old)
and /work/SRC/openSUSE:Factory/.perl-Syntax-Keyword-Try.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Syntax-Keyword-Try"
Mon Sep 9 23:53:18 2019 rev:2 rq:729394 version:0.11
Changes:
--------
---
/work/SRC/openSUSE:Factory/perl-Syntax-Keyword-Try/perl-Syntax-Keyword-Try.changes
2019-07-11 13:15:28.154822665 +0200
+++
/work/SRC/openSUSE:Factory/.perl-Syntax-Keyword-Try.new.7948/perl-Syntax-Keyword-Try.changes
2019-09-09 23:53:21.373267536 +0200
@@ -1,0 +2,16 @@
+Sun Sep 8 19:54:48 UTC 2019 - <[email protected]>
+
+- updated to 0.11
+ see /usr/share/doc/packages/perl-Syntax-Keyword-Try/Changes
+
+ 0.11 2019-09-07
+ [CHANGES]
+ * Use wrap_keyword_plugin() instead of direct access to
+ PL_keyword_plugin
+ [BUGFIXES]
+ * Build OP_ENTER/OP_LEAVE structure the correct way so perl 5.31.3
+ doesn't crash
+ * Fix OP_NEXT/OP_LAST/OP_REDO mangling for perl 5.31.3 to avoid
+ CPU spin (RT129975)
+
+-------------------------------------------------------------------
Old:
----
Syntax-Keyword-Try-0.10.tar.gz
New:
----
Syntax-Keyword-Try-0.11.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Syntax-Keyword-Try.spec ++++++
--- /var/tmp/diff_new_pack.zOaOTM/_old 2019-09-09 23:53:21.817267444 +0200
+++ /var/tmp/diff_new_pack.zOaOTM/_new 2019-09-09 23:53:21.821267443 +0200
@@ -17,7 +17,7 @@
Name: perl-Syntax-Keyword-Try
-Version: 0.10
+Version: 0.11
Release: 0
%define cpan_name Syntax-Keyword-Try
Summary: C<try/catch/finally> syntax for perl
++++++ Syntax-Keyword-Try-0.10.tar.gz -> Syntax-Keyword-Try-0.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.10/Changes
new/Syntax-Keyword-Try-0.11/Changes
--- old/Syntax-Keyword-Try-0.10/Changes 2019-06-13 18:28:50.000000000 +0200
+++ new/Syntax-Keyword-Try-0.11/Changes 2019-09-07 02:20:31.000000000 +0200
@@ -1,5 +1,15 @@
Revision history for Syntax-Keyword-Try
+0.11 2019-09-07
+ [CHANGES]
+ * Use wrap_keyword_plugin() instead of direct access to
+ PL_keyword_plugin
+ [BUGFIXES]
+ * Build OP_ENTER/OP_LEAVE structure the correct way so perl 5.31.3
+ doesn't crash
+ * Fix OP_NEXT/OP_LAST/OP_REDO mangling for perl 5.31.3 to avoid
+ CPU spin (RT129975)
+
0.10 2019-06-13
[CHANGES]
* Added experimental value-semantic expression form (RT121267)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.10/META.json
new/Syntax-Keyword-Try-0.11/META.json
--- old/Syntax-Keyword-Try-0.10/META.json 2019-06-13 18:28:50.000000000
+0200
+++ new/Syntax-Keyword-Try-0.11/META.json 2019-09-07 02:20:31.000000000
+0200
@@ -38,7 +38,7 @@
"provides" : {
"Syntax::Keyword::Try" : {
"file" : "lib/Syntax/Keyword/Try.pm",
- "version" : "0.10"
+ "version" : "0.11"
}
},
"release_status" : "stable",
@@ -48,6 +48,6 @@
],
"x_IRC" : "irc://irc.perl.org/#io-async"
},
- "version" : "0.10",
- "x_serialization_backend" : "JSON::PP version 4.00"
+ "version" : "0.11",
+ "x_serialization_backend" : "JSON::PP version 4.04"
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.10/META.yml
new/Syntax-Keyword-Try-0.11/META.yml
--- old/Syntax-Keyword-Try-0.10/META.yml 2019-06-13 18:28:50.000000000
+0200
+++ new/Syntax-Keyword-Try-0.11/META.yml 2019-09-07 02:20:31.000000000
+0200
@@ -17,11 +17,11 @@
provides:
Syntax::Keyword::Try:
file: lib/Syntax/Keyword/Try.pm
- version: '0.10'
+ version: '0.11'
requires:
perl: '5.014'
resources:
IRC: irc://irc.perl.org/#io-async
license: http://dev.perl.org/licenses/
-version: '0.10'
+version: '0.11'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.10/README
new/Syntax-Keyword-Try-0.11/README
--- old/Syntax-Keyword-Try-0.10/README 2019-06-13 18:28:50.000000000 +0200
+++ new/Syntax-Keyword-Try-0.11/README 2019-09-07 02:20:31.000000000 +0200
@@ -134,7 +134,7 @@
expression. Because this syntax is new, experimental, and somewhat
surprising, it must be specifically requested by name try_value:
- use Syntax::Feature::Try qw( try try_value );
+ use Syntax::Keyword::Try qw( try try_value );
my $result = try do { ... } catch { ... };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.10/lib/Syntax/Keyword/Try.pm
new/Syntax-Keyword-Try-0.11/lib/Syntax/Keyword/Try.pm
--- old/Syntax-Keyword-Try-0.10/lib/Syntax/Keyword/Try.pm 2019-06-13
18:28:50.000000000 +0200
+++ new/Syntax-Keyword-Try-0.11/lib/Syntax/Keyword/Try.pm 2019-09-07
02:20:31.000000000 +0200
@@ -8,7 +8,7 @@
use strict;
use warnings;
-our $VERSION = '0.10';
+our $VERSION = '0.11';
use Carp;
@@ -153,7 +153,7 @@
Because this syntax is new, experimental, and somewhat surprising, it must be
specifically requested by name C<try_value>:
- use Syntax::Feature::Try qw( try try_value );
+ use Syntax::Keyword::Try qw( try try_value );
my $result = try do { ... } catch { ... };
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Syntax-Keyword-Try-0.10/lib/Syntax/Keyword/Try.xs
new/Syntax-Keyword-Try-0.11/lib/Syntax/Keyword/Try.xs
--- old/Syntax-Keyword-Try-0.10/lib/Syntax/Keyword/Try.xs 2019-06-13
18:28:50.000000000 +0200
+++ new/Syntax-Keyword-Try-0.11/lib/Syntax/Keyword/Try.xs 2019-09-07
02:20:31.000000000 +0200
@@ -7,11 +7,6 @@
#include "perl.h"
#include "XSUB.h"
-#ifndef OP_CHECK_MUTEX_LOCK /* < 5.15.8 */
-#define OP_CHECK_MUTEX_LOCK ((void)0)
-#define OP_CHECK_MUTEX_UNLOCK ((void)0)
-#endif
-
/* Before perl 5.22 these were not visible */
#ifndef cv_clone
@@ -41,12 +36,44 @@
#define PERL_VERSION_GE(r,v,s) \
(PERL_DECIMAL_VERSION >= PERL_VERSION_DECIMAL(r,v,s))
+#if PERL_VERSION_GE(5,26,0)
+# define HAVE_OP_SIBPARENT
+#endif
+
#if PERL_VERSION_GE(5,19,4)
typedef SSize_t array_ix_t;
#else /* <5.19.4 */
typedef I32 array_ix_t;
#endif /* <5.19.4 */
+#ifndef wrap_keyword_plugin
+# ifndef OP_CHECK_MUTEX_LOCK /* < 5.15.8 */
+# define OP_CHECK_MUTEX_LOCK ((void)0)
+# define OP_CHECK_MUTEX_UNLOCK ((void)0)
+# endif
+
+# define wrap_keyword_plugin(func, var) S_wrap_keyword_plugin(aTHX_ func,
var)
+static void S_wrap_keyword_plugin(pTHX_ Perl_keyword_plugin_t func,
Perl_keyword_plugin_t *var)
+{
+ /* BOOT can potentially race with other threads (RT123547) */
+
+ /* Perl doesn't really provide us a nice mutex for doing this so this is the
+ * best we can find. See also
+ * https://rt.perl.org/Public/Bug/Display.html?id=132413
+ */
+ if(*var)
+ return;
+
+ OP_CHECK_MUTEX_LOCK;
+ if(!*var) {
+ *var = PL_keyword_plugin;
+ PL_keyword_plugin = func;
+ }
+
+ OP_CHECK_MUTEX_UNLOCK;
+}
+#endif
+
static OP *pp_entertrycatch(pTHX);
static OP *pp_catch(pTHX);
@@ -295,18 +322,28 @@
case OP_LAST:
case OP_REDO:
{
- OP *stateop, *afterop = OpSIBLING(op);
+#ifdef HAVE_OP_SIBPARENT
+ OP *parent = OpHAS_SIBLING(op) ? NULL : op->op_sibparent;
+#endif
- *op_ptr = newLISTOP(OP_SCOPE, 0,
- stateop = newSTATEOP_nowarnings(),
- op);
+ OP *stateop = newSTATEOP_nowarnings();
- (*op_ptr)->op_next = stateop;
+ OP *scope = newLISTOP(OP_SCOPE, 0,
+ stateop, op);
+#ifdef HAVE_OP_SIBPARENT
+ if(parent)
+ OpLASTSIB_set(scope, parent);
+ else
+ OpLASTSIB_set(scope, NULL);
+#else
+ op->op_sibling = NULL;
+#endif
+
+ /* Rethread */
+ scope->op_next = stateop;
stateop->op_next = op;
- if(afterop) {
- OpMORESIB_set(op, NULL);
- OpMORESIB_set(*op_ptr, afterop);
- }
+
+ *op_ptr = scope;
}
break;
@@ -332,7 +369,8 @@
else
cUNOPx(op)->op_first = newkid;
- OpMORESIB_set(newkid, next);
+ if(next)
+ OpMORESIB_set(newkid, next);
}
prev = kid;
@@ -472,9 +510,10 @@
ret = op_prepend_elem(OP_LINESEQ, newPUSHFINALLYOP(finally), ret);
}
- ret = newLISTOP(OP_LEAVE, 0,
- op_prepend_elem(OP_LINESEQ, newOP(OP_ENTER, 0), ret),
- NULL);
+ ret = op_append_list(OP_LEAVE,
+ newOP(OP_ENTER, 0),
+ ret);
+
if(is_value)
ret->op_ppaddr = &pp_leave_keeping_stack;
@@ -503,27 +542,16 @@
MODULE = Syntax::Keyword::Try PACKAGE = Syntax::Keyword::Try
BOOT:
- /* BOOT can potentially race with other threads (RT123547) */
+ XopENTRY_set(&xop_catch, xop_name, "catch");
+ XopENTRY_set(&xop_catch, xop_desc,
+ "optionally invoke the catch block if required");
+ XopENTRY_set(&xop_catch, xop_class, OA_LOGOP);
+ Perl_custom_op_register(aTHX_ &pp_catch, &xop_catch);
+
+ XopENTRY_set(&xop_pushfinally, xop_name, "pushfinally");
+ XopENTRY_set(&xop_pushfinally, xop_desc,
+ "arrange for a CV to be invoked at scope exit");
+ XopENTRY_set(&xop_pushfinally, xop_class, OA_SVOP);
+ Perl_custom_op_register(aTHX_ &pp_pushfinally, &xop_pushfinally);
- /* Perl doesn't really provide us a nice mutex for doing this so this is the
- * best we can find. See also
- * https://rt.perl.org/Public/Bug/Display.html?id=132413
- */
- OP_CHECK_MUTEX_LOCK;
- if(!next_keyword_plugin) {
- next_keyword_plugin = PL_keyword_plugin;
- PL_keyword_plugin = &my_keyword_plugin;
-
- XopENTRY_set(&xop_catch, xop_name, "catch");
- XopENTRY_set(&xop_catch, xop_desc,
- "optionally invoke the catch block if required");
- XopENTRY_set(&xop_catch, xop_class, OA_LOGOP);
- Perl_custom_op_register(aTHX_ &pp_catch, &xop_catch);
-
- XopENTRY_set(&xop_pushfinally, xop_name, "pushfinally");
- XopENTRY_set(&xop_pushfinally, xop_desc,
- "arrange for a CV to be invoked at scope exit");
- XopENTRY_set(&xop_pushfinally, xop_class, OA_SVOP);
- Perl_custom_op_register(aTHX_ &pp_pushfinally, &xop_pushfinally);
- }
- OP_CHECK_MUTEX_UNLOCK;
+ wrap_keyword_plugin(&my_keyword_plugin, &next_keyword_plugin);