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_sys.c
index 7122499..1a75bbb 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1306,7 +1306,7 @@ PP(pp_enterwrite)
        DIE(aTHX_ "Not a format reference");
     }
     if (CvCLONE(cv))
-       cv = (CV*)sv_2mortal((SV*)cv_clone(cv));
+       cv = MUTABLE_CV(sv_2mortal((SV*)cv_clone(cv)));
 
     IoFLAGS(io) &= ~IOf_DIDTOP;
     return doform(cv,gv,PL_op->op_next);
@@ -1397,7 +1397,7 @@ PP(pp_leavewrite)
                DIE(aTHX_ "Undefined top format called");
        }
        if (cv && CvCLONE(cv))
-           cv = (CV*)sv_2mortal((SV*)cv_clone(cv));
+           cv = MUTABLE_CV(sv_2mortal((SV*)cv_clone(cv)));
        return doform(cv, gv, PL_op);
     }