perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From apr...@apache.org
Subject svn commit: r1328477 - in /perl/modperl/trunk/src/modules/perl: modperl_const.c modperl_perl.c
Date Fri, 20 Apr 2012 18:47:06 GMT
Author: aprime
Date: Fri Apr 20 18:47:05 2012
New Revision: 1328477

URL: http://svn.apache.org/viewvc?rev=1328477&view=rev
Log:
add ifdef's for MUTABLE_CV usage to preserve perl 5.8.5 compatibility


Modified:
    perl/modperl/trunk/src/modules/perl/modperl_const.c
    perl/modperl/trunk/src/modules/perl/modperl_perl.c

Modified: perl/modperl/trunk/src/modules/perl/modperl_const.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_const.c?rev=1328477&r1=1328476&r2=1328477&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_const.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_const.c Fri Apr 20 18:47:05 2012
@@ -51,7 +51,11 @@ static void new_constsub(pTHX_ constants
             gv_init(alias, caller_stash, name, name_len, TRUE);
         }
 
+#ifdef MUTABLE_CV
         GvCV_set(alias, MUTABLE_CV(SvREFCNT_inc(GvCV(*gvp))));
+#else
+        GvCV_set(alias, (CV*)(SvREFCNT_inc(GvCV(*gvp))));
+#endif
     }
 }
 

Modified: perl/modperl/trunk/src/modules/perl/modperl_perl.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_perl.c?rev=1328477&r1=1328476&r2=1328477&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_perl.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_perl.c Fri Apr 20 18:47:05 2012
@@ -55,8 +55,13 @@ void modperl_perl_core_global_init(pTHX)
 
     while (cglobals->name) {
         GV *gv = gv_fetchpv(cglobals->core_name, TRUE, SVt_PVCV);
+#ifdef MUTABLE_CV
         GvCV_set(gv,
                  MUTABLE_CV(SvREFCNT_inc(get_cv(cglobals->sub_name, TRUE))));
+#else
+        GvCV_set(gv,
+                 (CV*)(SvREFCNT_inc(get_cv(cglobals->sub_name, TRUE))));
+#endif
         GvIMPORTED_CV_on(gv);
         cglobals++;
     }



Mime
View raw message