r77319 - in /trunk/libalias-perl/debian: changelog patches/ patches/0001-Don-t-use-GvCV-as-an-lvalue-that-broke-with-Perl-5.1.patch patches/series source/ source/format

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Sun Jul 10 19:03:36 UTC 2011


Author: gregoa
Date: Sun Jul 10 19:03:33 2011
New Revision: 77319

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=77319
Log:
* Switch to source format 3.0 (quilt).
* Add patch by Niko Tyni to work with perl 5.14 (closes: #627805).

Added:
    trunk/libalias-perl/debian/patches/
    trunk/libalias-perl/debian/patches/0001-Don-t-use-GvCV-as-an-lvalue-that-broke-with-Perl-5.1.patch
    trunk/libalias-perl/debian/patches/series
    trunk/libalias-perl/debian/source/
    trunk/libalias-perl/debian/source/format
Modified:
    trunk/libalias-perl/debian/changelog

Modified: trunk/libalias-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalias-perl/debian/changelog?rev=77319&op=diff
==============================================================================
--- trunk/libalias-perl/debian/changelog (original)
+++ trunk/libalias-perl/debian/changelog Sun Jul 10 19:03:33 2011
@@ -29,6 +29,8 @@
   [ gregor herrmann ]
   * Change my email address.
   * Remove Conflicts:/Provides: alias.
+  * Switch to source format 3.0 (quilt).
+  * Add patch by Niko Tyni to work with perl 5.14 (closes: #627805).
 
  -- Joachim Breitner <nomeata at debian.org>  Mon, 11 Feb 2008 20:22:36 +0000
 

Added: trunk/libalias-perl/debian/patches/0001-Don-t-use-GvCV-as-an-lvalue-that-broke-with-Perl-5.1.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalias-perl/debian/patches/0001-Don-t-use-GvCV-as-an-lvalue-that-broke-with-Perl-5.1.patch?rev=77319&op=file
==============================================================================
--- trunk/libalias-perl/debian/patches/0001-Don-t-use-GvCV-as-an-lvalue-that-broke-with-Perl-5.1.patch (added)
+++ trunk/libalias-perl/debian/patches/0001-Don-t-use-GvCV-as-an-lvalue-that-broke-with-Perl-5.1.patch Sun Jul 10 19:03:33 2011
@@ -1,0 +1,74 @@
+Bug-Debian: http://bugs.debian.org/627805
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=64987
+Forwarded: https://rt.cpan.org/Public/Bug/Display.html?id=64987
+
+From dce94627191e7bde462f7dbb221dec63d4b13520 Mon Sep 17 00:00:00 2001
+From: Niko Tyni <ntyni at debian.org>
+Date: Sun, 10 Jul 2011 13:50:58 +0300
+Subject: [PATCH] Don't use GvCV() as an lvalue, that broke with Perl 5.13.10
+
+As seen in [rt.cpan.org #64987], GvCV() can't be assigned to anymore so
+use the new GvCV_set() macro when available or implement it the old way
+if it isn't.
+
+Also, set up a SAVEDESTRUCTOR function to restore the old CV value
+because we can't store it in the GV anymore. This part was adapted
+from Scope-Upper-0.14 by Vincent Pit.
+---
+ Alias.xs |   33 +++++++++++++++++++++++++++++++--
+ 1 files changed, 31 insertions(+), 2 deletions(-)
+
+diff --git a/Alias.xs b/Alias.xs
+index 9272b47..a7dcf20 100644
+--- a/Alias.xs
++++ b/Alias.xs
+@@ -15,6 +15,35 @@ extern "C" {
+ #define PERL_SUBVERSION       SUBVERSION
+ #endif
+ 
++#ifndef GvCV_set
++#define GvCV_set(gv,cv) GvCV((gv)) = (cv)
++#endif
++
++/* Since perl 5.13.10, GvCV() is only a rvalue so we no longer can store a
++ * pointer to the gvcv member of the gv.
++ *
++ * Adapted from a similar fix in Scope-Upper-0.14 by Vincent Pit.
++ */
++
++typedef struct {
++	GV *gv;
++	CV *old_cv;
++} saved_cv;
++
++static void restore_gvcv(saved_cv *s) {
++	GvCV_set(s->gv, s->old_cv);
++	Safefree(s);
++}
++
++static void save_gvcv(GV *gv) {
++	saved_cv *s;
++	Newx(s, 1, saved_cv);
++ 	s->gv     = gv;
++ 	s->old_cv = GvCV(gv);
++
++	SAVEDESTRUCTOR(restore_gvcv, s);
++}
++
+ #if PERL_REVISION == 5 && (PERL_VERSION < 4 || (PERL_VERSION == 4 && PERL_SUBVERSION <= 75 ))
+ 
+ #define PL_stack_sp	stack_sp
+@@ -205,8 +234,8 @@ alias_attr(hashref)
+ 			save_gp(gv,TRUE);   /* hide previous entry in symtab */
+ 			break;
+ 		    case SVt_PVCV:
+-			SAVESPTR(GvCV(gv));
+-			GvCV(gv) = Null(CV*);
++			save_gvcv(gv);
++			GvCV_set(gv,Null(CV*));
+ 			break;
+ 		    default:
+ 			save_scalar(gv);
+-- 
+1.7.5.4
+

Added: trunk/libalias-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalias-perl/debian/patches/series?rev=77319&op=file
==============================================================================
--- trunk/libalias-perl/debian/patches/series (added)
+++ trunk/libalias-perl/debian/patches/series Sun Jul 10 19:03:33 2011
@@ -1,0 +1,1 @@
+0001-Don-t-use-GvCV-as-an-lvalue-that-broke-with-Perl-5.1.patch

Added: trunk/libalias-perl/debian/source/format
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libalias-perl/debian/source/format?rev=77319&op=file
==============================================================================
--- trunk/libalias-perl/debian/source/format (added)
+++ trunk/libalias-perl/debian/source/format Sun Jul 10 19:03:33 2011
@@ -1,0 +1,1 @@
+3.0 (quilt)




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