perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From steve...@apache.org
Subject svn commit: r1777355 - /perl/modperl/trunk/src/modules/perl/modperl_env.c
Date Wed, 04 Jan 2017 18:14:45 GMT
Author: stevehay
Date: Wed Jan  4 18:14:45 2017
New Revision: 1777355

URL: http://svn.apache.org/viewvc?rev=1777355&view=rev
Log:
Fix build breakage caused by r1717474 in perl < 5.13.6 (mg_free_type() was added in 5.13.6).

Spotted by Rainer Jung <rainer.jung@kippdata.de>.

Modified:
    perl/modperl/trunk/src/modules/perl/modperl_env.c

Modified: perl/modperl/trunk/src/modules/perl/modperl_env.c
URL: http://svn.apache.org/viewvc/perl/modperl/trunk/src/modules/perl/modperl_env.c?rev=1777355&r1=1777354&r2=1777355&view=diff
==============================================================================
--- perl/modperl/trunk/src/modules/perl/modperl_env.c (original)
+++ perl/modperl/trunk/src/modules/perl/modperl_env.c Wed Jan  4 18:14:45 2017
@@ -670,7 +670,11 @@ void modperl_env_init(pTHX)
                mg->mg_ptr, mg->mg_obj, mg->mg_flags);
 
     /* Remove it */
+#if MP_PERL_VERSION_AT_LEAST(5, 13, 6)
     mg_free_type((SV*)ENVHV, PERL_MAGIC_env);
+#else
+    mg_free((SV*)ENVHV);
+#endif
 
     /* Add our version instead */
     mg = sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &MP_vtbl_env, (char*)NULL,
0);
@@ -699,7 +703,11 @@ void modperl_env_unload(pTHX)
                mg->mg_ptr, mg->mg_obj, mg->mg_flags);
 
     /* Remove it */
+#if MP_PERL_VERSION_AT_LEAST(5, 13, 6)
     mg_free_type((SV*)ENVHV, PERL_MAGIC_env);
+#else
+    mg_free((SV*)ENVHV);
+#endif
 
     /* Restore perl's original version */
     sv_magicext((SV*)ENVHV, (SV*)NULL, PERL_MAGIC_env, &PL_vtbl_env, (char*)NULL, 0);



Mime
View raw message