In addition to correctly describing the behavior of S_CvGV, this avoids
warnings in op.c:Perl_report_redefined_cv, where the old (CV *) cast
removed the 'const' qualifier. Observed on OpenBSD 5.2 with gcc-4.2.1.
#define CvROOT(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_root_u.xcv_root
#define CvXSUB(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_root_u.xcv_xsub
#define CvXSUBANY(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_start_u.xcv_xsubany
-#define CvGV(sv) S_CvGV((CV *)(sv))
+#define CvGV(sv) S_CvGV((const CV *)(sv))
#define CvGV_set(cv,gv) Perl_cvgv_set(aTHX_ cv, gv)
#define CvFILE(sv) ((XPVCV*)MUTABLE_PTR(SvANY(sv)))->xcv_file
#ifdef USE_ITHREADS
#define XS_DYNAMIC_FILENAME 0x01 /* The filename isn't static */
PERL_STATIC_INLINE GV *
-S_CvGV(CV *sv)
+S_CvGV(const CV *sv)
{
return CvNAMED(sv)
? 0