diff options
author | Andy Dougherty <doughera@lafayette.edu> | 2013-07-12 09:26:18 -0400 |
---|---|---|
committer | Andy Dougherty <doughera@lafayette.edu> | 2013-07-12 12:26:57 -0400 |
commit | bca8f980420acdca62da941e2d02a8a51ee7e57a (patch) | |
tree | 18c0df456957b8b78ea1dafb8d57f40336b0d365 /cv.h | |
parent | 9ec237a175983ee0ad7a2ccd66f797f9e01b74a1 (diff) | |
download | perl-bca8f980420acdca62da941e2d02a8a51ee7e57a.tar.gz |
Add a const qualifier for the arg to the S_CvGV inline function in cv.h.
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.
Diffstat (limited to 'cv.h')
-rw-r--r-- | cv.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -49,7 +49,7 @@ See L<perlguts/Autoloading with XSUBs>. #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 @@ -189,7 +189,7 @@ See L<perlguts/Autoloading with XSUBs>. #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 |