[libparams-classify-perl] 01/04: Add patch for compatibility with upcoming Pel 5.26.

gregor herrmann gregoa at debian.org
Sat May 20 09:20:46 UTC 2017


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository libparams-classify-perl.

commit 9fa7006e848f517ae6273a87b47eaf5cfcca7ead
Author: gregor herrmann <gregoa at debian.org>
Date:   Sat May 20 11:13:58 2017 +0200

    Add patch for compatibility with upcoming Pel 5.26.
---
 debian/patches/op_sibling_fixes.patch | 86 +++++++++++++++++++++++++++++++++++
 debian/patches/series                 |  1 +
 2 files changed, 87 insertions(+)

diff --git a/debian/patches/op_sibling_fixes.patch b/debian/patches/op_sibling_fixes.patch
new file mode 100644
index 0000000..1202f33
--- /dev/null
+++ b/debian/patches/op_sibling_fixes.patch
@@ -0,0 +1,86 @@
+Description: Fix for 5.25 or 5.22/24 with PERL_OP_PARENT
+Origin: CPAN RT
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=114490
+Author: Matthew Horsfall (alh)
+Reviewed-by: gregor herrmann <gregoa at debian.org>
+Last-Update: 2017-05-20
+
+--- a/lib/Params/Classify.xs
++++ b/lib/Params/Classify.xs
+@@ -41,6 +41,26 @@
+ # define FPTR2DPTR(t,x) ((t)(UV)(x))
+ #endif /* !FPTR2DPTR */
+ 
++#ifndef OpHAS_SIBLING
++#  define OpHAS_SIBLING(o)               (cBOOL((o)->op_sibling))
++#endif
++
++#ifndef OpSIBLING
++#  define OpSIBLING(o)                   (0 + (o)->op_sibling)
++#endif
++
++#ifndef OpMORESIB_set
++#  define OpMORESIB_set(o, sib)          ((o)->op_sibling = (sib))
++#endif
++
++#ifndef OpLASTSIB_set
++#  define OpLASTSIB_set(o, parent)       ((o)->op_sibling = NULL)
++#endif
++
++#ifndef OpMAYBESIB_set
++#  define OpMAYBESIB_set(o, sib, parent) ((o)->op_sibling = (sib))
++#endif
++
+ #ifndef ptr_table_new
+ 
+ struct q_ptr_tbl_ent {
+@@ -625,8 +645,8 @@
+ 	OP *(*ppfunc)(pTHX);
+ 	I32 cvflags;
+ 	pushop = cUNOPx(op)->op_first;
+-	if(!pushop->op_sibling) pushop = cUNOPx(pushop)->op_first;
+-	for(cvop = pushop; cvop->op_sibling; cvop = cvop->op_sibling) ;
++	if(!OpHAS_SIBLING(pushop)) pushop = cUNOPx(pushop)->op_first;
++	for(cvop = pushop; OpHAS_SIBLING(cvop); cvop = OpSIBLING(cvop)) ;
+ 	if(!(cvop->op_type == OP_RV2CV &&
+ 			!(cvop->op_private & OPpENTERSUB_AMPER) &&
+ 			(cv = rvop_cv(cUNOPx(cvop)->op_first)) &&
+@@ -635,20 +655,20 @@
+ 		return nxck_entersub(aTHX_ op);
+ 	cvflags = CvXSUBANY(cv).any_i32;
+ 	op = nxck_entersub(aTHX_ op);   /* for prototype checking */
+-	aop = pushop->op_sibling;
+-	bop = aop->op_sibling;
++	aop = OpSIBLING(pushop);
++	bop = OpSIBLING(aop);
+ 	if(bop == cvop) {
+ 		if(!(cvflags & PC_ALLOW_UNARY)) return op;
+ 		unary:
+-		pushop->op_sibling = bop;
+-		aop->op_sibling = NULL;
++		OpLASTSIB_set(pushop, bop);
++		OpLASTSIB_set(aop, NULL);
+ 		op_free(op);
+ 		op = newUNOP(OP_NULL, 0, aop);
+ 		op->op_type = OP_RAND;
+ 		op->op_ppaddr = ppfunc;
+ 		op->op_private = (U8)cvflags;
+ 		return op;
+-	} else if(bop && bop->op_sibling == cvop) {
++	} else if(bop && OpSIBLING(op) == cvop) {
+ 		if(!(cvflags & PC_ALLOW_BINARY)) return op;
+ 		if(ppfunc == THX_pp_check_sclass &&
+ 				(cvflags & PC_TYPE_MASK) == SCLASS_REF) {
+@@ -667,9 +687,9 @@
+ 			cvflags &= ~PC_TYPE_MASK;
+ 			ppfunc = THX_pp_check_dyn_battr;
+ 		}
+-		pushop->op_sibling = cvop;
+-		aop->op_sibling = NULL;
+-		bop->op_sibling = NULL;
++		OpLASTSIB_set(pushop, cvop);
++		OpLASTSIB_set(aop, NULL);
++		OpLASTSIB_set(bop, NULL);
+ 		op_free(op);
+ 		op = newBINOP(OP_NULL, 0, aop, bop);
+ 		op->op_type = OP_RAND;
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b2ac153
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+op_sibling_fixes.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libparams-classify-perl.git



More information about the Pkg-perl-cvs-commits mailing list