From: Nicholas Clark Date: Wed, 29 Oct 2008 21:36:17 +0000 (+0000) Subject: As Perl_cv_const_sv() now takes a const CV *, use that as the cast for X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=126f53f392147cb95f8643714b33fe373747680a;p=p5sagit%2Fp5-mst-13.2.git As Perl_cv_const_sv() now takes a const CV *, use that as the cast for its arguments. p4raw-id: //depot/perl@34646 --- diff --git a/dump.c b/dump.c index 3a34fcb..88adc9f 100644 --- a/dump.c +++ b/dump.c @@ -1805,7 +1805,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo do_op_dump(level+1, file, CvROOT(sv)); } } else { - SV * const constant = cv_const_sv((CV *)sv); + SV * const constant = cv_const_sv((const CV *)sv); Perl_dump_indent(aTHX_ level, file, " XSUB = 0x%"UVxf"\n", PTR2UV(CvXSUB(sv))); diff --git a/pp.c b/pp.c index d16b095..af00a2a 100644 --- a/pp.c +++ b/pp.c @@ -809,7 +809,7 @@ PP(pp_undef) hv_undef(MUTABLE_HV(sv)); break; case SVt_PVCV: - if (cv_const_sv((CV*)sv) && ckWARN(WARN_MISC)) + if (cv_const_sv((const CV *)sv) && ckWARN(WARN_MISC)) Perl_warner(aTHX_ packWARN(WARN_MISC), "Constant subroutine %s undefined", CvANON((CV*)sv) ? "(anonymous)" : GvENAME(CvGV((CV*)sv))); /* FALLTHROUGH */ diff --git a/sv.c b/sv.c index c388113..6acddc1 100644 --- a/sv.c +++ b/sv.c @@ -3522,7 +3522,8 @@ S_glob_assign_ref(pTHX_ SV *const dstr, SV *const sstr) /* Redefining a sub - warning is mandatory if it was a const and its value changed. */ if (CvCONST(cv) && CvCONST((CV*)sref) - && cv_const_sv(cv) == cv_const_sv((CV*)sref)) { + && cv_const_sv(cv) + == cv_const_sv((const CV *)sref)) { NOOP; /* They are 2 constant subroutines generated from the same constant. This probably means that @@ -3535,7 +3536,8 @@ S_glob_assign_ref(pTHX_ SV *const dstr, SV *const sstr) || (CvCONST(cv) && (!CvCONST((CV*)sref) || sv_cmp(cv_const_sv(cv), - cv_const_sv((CV*)sref))))) { + cv_const_sv((const CV *) + sref))))) { Perl_warner(aTHX_ packWARN(WARN_REDEFINE), (const char *) (CvCONST(cv)