[libcoro-perl] 01/02: add a new patch for 5.22/5.24 compatibility

gregor herrmann gregoa at debian.org
Fri May 20 13:04:19 UTC 2016


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

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

commit dcd10ba9611b38e0ef19ef597b42b635fa23d942
Author: gregor herrmann <gregoa at debian.org>
Date:   Fri May 20 15:01:26 2016 +0200

    add a new patch for 5.22/5.24 compatibility
    
    Gbp-Dch: Ignore
---
 debian/patches/coro-5.22.patch | 65 +++++++++++++++++++++++++++++++++---------
 1 file changed, 51 insertions(+), 14 deletions(-)

diff --git a/debian/patches/coro-5.22.patch b/debian/patches/coro-5.22.patch
index 3019ef0..f0234c1 100644
--- a/debian/patches/coro-5.22.patch
+++ b/debian/patches/coro-5.22.patch
@@ -1,12 +1,9 @@
-Subject: Re: [PATCH] - fix for Coro (was Re: revert MG consting (Coro breakage) for 5.24?)
- This patch works on an unpatched 5.22.0.
-Message-ID: <86840949-52FC-4F12-A3E2-628EEAAE0C66 at cpan.org>
-Date: Wed, 4 May 2016 15:29:58 -0700
-To: Perl5 Porters <perl5-porters at perl.org>
-From: sprout at cpan.org (Father Chrysostomos)
-Bug-Debian: https://bugs.debian.org/787500
+Description: fix for Coro with 5.22 and 5.24
 Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101063
-
+Bug-Debian: https://bugs.debian.org/787500
+Author: Anonymous
+Origin: https://paste.debian.net/688072
+Last-Update: 2016-05-20
 
 --- a/Coro/State.xs
 +++ b/Coro/State.xs
@@ -21,7 +18,21 @@ Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101063
  #else
  typedef AV PADNAMELIST;
  # if !PERL_VERSION_ATLEAST(5,8,0)
-@@ -1029,10 +1033,6 @@ coro_rss (pTHX_ struct coro *coro)
+@@ -951,7 +955,13 @@ coro_init_stacks (pTHX)
+ 
+     New(54,PL_savestack,24,ANY);
+     PL_savestack_ix = 0;
++#ifdef SS_MAXPUSH
++    /* Of course, if you clone the code, you have to track the changes... */
++    /*PL_savestack_max lies: it always has SS_MAXPUSH more than it claims */
++    PL_savestack_max = 24 - SS_MAXPUSH;
++#else
+     PL_savestack_max = 24;
++#endif
+ 
+ #if !PERL_VERSION_ATLEAST (5,10,0)
+     New(54,PL_retstack,4,OP*);
+@@ -1029,10 +1039,6 @@ coro_rss (pTHX_ struct coro *coro)
  
  /** coroutine stack handling ************************************************/
  
@@ -32,7 +43,7 @@ Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101063
  /* apparently < 5.8.8 */
  #ifndef MgPV_nolen_const
  #define MgPV_nolen_const(mg)    (((((int)(mg)->mg_len)) == HEf_SVKEY) ?   \
-@@ -1074,7 +1074,7 @@ coro_sigelem_get (pTHX_ SV *sv, MAGIC *m
+@@ -1074,7 +1080,7 @@ coro_sigelem_get (pTHX_ SV *sv, MAGIC *m
          }
      }
  
@@ -41,7 +52,7 @@ Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101063
  }
  
  static int ecb_cold
-@@ -1098,7 +1098,7 @@ coro_sigelem_clr (pTHX_ SV *sv, MAGIC *m
+@@ -1098,7 +1104,7 @@ coro_sigelem_clr (pTHX_ SV *sv, MAGIC *m
          }
      }
  
@@ -50,7 +61,7 @@ Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101063
  }
  
  static int ecb_cold
-@@ -1122,9 +1122,41 @@ coro_sigelem_set (pTHX_ SV *sv, MAGIC *m
+@@ -1122,9 +1128,42 @@ coro_sigelem_set (pTHX_ SV *sv, MAGIC *m
          }
      }
  
@@ -74,7 +85,8 @@ Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101063
 +static int ecb_cold
 +coro_sig_copy (pTHX_ SV *sv, MAGIC *mg, SV *nsv, const char *key, I32 klen)
 +{
-+  return sv_magicext (nsv, mg->mg_obj, 'u', &sigelem_vtbl, key, klen);
++  sv_magicext (nsv, mg->mg_obj, 'u', &sigelem_vtbl, key, klen);
++  return 1;
  }
  
 +static MGVTBL sig_vtbl = {
@@ -93,7 +105,32 @@ Bug: https://rt.cpan.org/Public/Bug/Display.html?id=101063
  static void
  prepare_nop (pTHX_ struct coro_transfer_args *ta)
  {
-@@ -3596,15 +3628,16 @@ BOOT:
+@@ -1395,7 +1434,11 @@ runops_trace (pTHX)
+                           PUSHMARK (SP);
+                           PUSHs (&PL_sv_yes);
+                           PUSHs (fullname);
++# if PERL_VERSION_ATLEAST(5,24,0)
++                          PUSHs (CxHASARGS (cx) ? sv_2mortal (newRV_inc (PL_curpad[0])) : &PL_sv_undef);
++#else
+                           PUSHs (CxHASARGS (cx) ? sv_2mortal (newRV_inc ((SV *)cx->blk_sub.argarray)) : &PL_sv_undef);
++#endif
+                           PUTBACK;
+                           cb = hv_fetch ((HV *)SvRV (coro_current), "_trace_sub_cb", sizeof ("_trace_sub_cb") - 1, 0);
+                           if (cb) call_sv (*cb, G_KEEPERR | G_EVAL | G_VOID | G_DISCARD);
+@@ -1488,7 +1531,11 @@ transfer_tail (pTHX)
+ static void ecb_noinline ecb_cold
+ perlish_exit (pTHX)
+ {
+-  int exitstatus = perl_destruct (PL_curinterp);
++  int exitstatus;
++  /* Because we've skipped the "not essential" things, we've not popped all */
++  /* the scopes, and perl_destruct has an assert() that checks this. */
++  PL_scopestack_ix = 1;
++  exitstatus = perl_destruct (PL_curinterp);
+   perl_free (PL_curinterp);
+   exit (exitstatus);
+ }
+@@ -3596,15 +3643,16 @@ BOOT:
          DEFSV;
          ERRSV;
  

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



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