ming (1:0.4.4-1.1) 07-GvCV-isn-t-an-lvalue-since-Perl-5.13.10.patch

Summary

 perl_ext/Exports.c  |    2 +-
 perl_ext/perl_swf.h |    4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

    
download this patch

Patch contents

From: Niko Tyni <ntyni@debian.org>
Date: Sun, 10 Jul 2011 21:46:09 +0300
Subject: [PATCH] GvCV() isn't an lvalue since Perl 5.13.10
Bug-Debian: http://bugs.debian.org/628501

GvCV() can't be assigned to anymore with recent perls, so use the new
GvCV_set() macro when available or implement it the old way if it isn't.

--- ming.orig/perl_ext/Exports.c
+++ ming/perl_ext/Exports.c
@@ -190,7 +190,7 @@
             SvPVX(caller), sub, SvPVX(class), sub); 
 #endif 
     gv = gv_fetchpv(form("%s::%s",SvPVX( caller), sub), TRUE, SVt_PVCV); 
-    GvCV(gv) = perl_get_cv(form("%s::%s", SvPVX(class), sub), TRUE); 
+    GvCV_set(gv, perl_get_cv(form("%s::%s", SvPVX(class), sub), TRUE)); 
     GvIMPORTED_CV_on(gv); 
     GvMULTI_on(gv);
 } 
--- ming.orig/perl_ext/perl_swf.h
+++ ming/perl_ext/perl_swf.h
@@ -58,6 +58,10 @@
 #define aTHXo_
 #endif
 
+#ifndef GvCV_set
+# define GvCV_set(G, C) (GvCV(G) = (C))
+#endif
+
 #ifndef S_DEBUG
 #define swf_debug 0   /* Should we get this from, say, $SWF::debug? */
 #define S_DEBUG(level,code)  if (swf_debug >= level) { code; }