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] / mg.c
diff --git a/mg.c b/mg.c
index e302e0f..18f9083 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -2916,7 +2916,7 @@ Perl_sighandler(int sig)
     if (flags & 16)
        PL_scopestack_ix += 1;
     /* sv_2cv is too complicated, try a simpler variant first: */
-    if (!SvROK(PL_psig_ptr[sig]) || !(cv = (CV*)SvRV(PL_psig_ptr[sig]))
+    if (!SvROK(PL_psig_ptr[sig]) || !(cv = MUTABLE_CV(SvRV(PL_psig_ptr[sig])))
        || SvTYPE(cv) != SVt_PVCV) {
        HV *st;
        cv = sv_2cv(PL_psig_ptr[sig], &st, &gv, GV_ADD);