This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add MUTABLE_CV(), and eliminate (CV *) casts in *.c.
[perl5.git] / pp_hot.c
index 44ded8a..d812e95 100644 (file)
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2714,7 +2714,7 @@ PP(pp_entersub)
            SV * const * sp = &sv;              /* Used in tryAMAGICunDEREF macro. */
            tryAMAGICunDEREF(to_cv);
        }       
-       cv = (CV*)SvRV(sv);
+       cv = MUTABLE_CV(SvRV(sv));
        if (SvTYPE(cv) == SVt_PVCV)
            break;
        /* FALL THROUGH */
@@ -2723,7 +2723,7 @@ PP(pp_entersub)
        DIE(aTHX_ "Not a CODE reference");
        /* This is the second most common case:  */
     case SVt_PVCV:
-       cv = (CV*)sv;
+       cv = MUTABLE_CV(sv);
        break;
     }