summaryrefslogtreecommitdiff
path: root/gv.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2005-03-13 08:20:05 -0600
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-03-14 14:35:33 +0000
commit35a4481cfdbca4941ab3a4206dc266f3e71c2385 (patch)
treec23e069f4598fa792835ff005405575a8e7605a5 /gv.c
parent38366c114d966e1bfc88beb6923273d54aa6e78d (diff)
downloadperl-35a4481cfdbca4941ab3a4206dc266f3e71c2385.tar.gz
Adding const qualifiers
Message-ID: <20050313202005.GA23535@petdance.com> p4raw-id: //depot/perl@24037
Diffstat (limited to 'gv.c')
-rw-r--r--gv.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/gv.c b/gv.c
index 83ec0eed2a..3ff41767c7 100644
--- a/gv.c
+++ b/gv.c
@@ -1102,7 +1102,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
break;
case '\026': /* $^V */
{
- SV *sv = GvSV(gv);
+ SV * const sv = GvSV(gv);
GvSV(gv) = new_version(PL_patchlevel);
SvREADONLY_on(GvSV(gv));
SvREFCNT_dec(sv);
@@ -1114,10 +1114,10 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags,
}
void
-Perl_gv_fullname4(pTHX_ SV *sv, GV *gv, const char *prefix, bool keepmain)
+Perl_gv_fullname4(pTHX_ SV *sv, const GV *gv, const char *prefix, bool keepmain)
{
- char *name;
- HV *hv = GvSTASH(gv);
+ const char *name;
+ const HV * const hv = GvSTASH(gv);
if (!hv) {
SvOK_off(sv);
return;
@@ -1136,36 +1136,36 @@ Perl_gv_fullname4(pTHX_ SV *sv, GV *gv, const char *prefix, bool keepmain)
}
void
-Perl_gv_fullname3(pTHX_ SV *sv, GV *gv, const char *prefix)
+Perl_gv_fullname3(pTHX_ SV *sv, const GV *gv, const char *prefix)
{
gv_fullname4(sv, gv, prefix, TRUE);
}
void
-Perl_gv_efullname4(pTHX_ SV *sv, GV *gv, const char *prefix, bool keepmain)
+Perl_gv_efullname4(pTHX_ SV *sv, const GV *gv, const char *prefix, bool keepmain)
{
- GV *egv = GvEGV(gv);
+ const GV *egv = GvEGV(gv);
if (!egv)
egv = gv;
gv_fullname4(sv, egv, prefix, keepmain);
}
void
-Perl_gv_efullname3(pTHX_ SV *sv, GV *gv, const char *prefix)
+Perl_gv_efullname3(pTHX_ SV *sv, const GV *gv, const char *prefix)
{
gv_efullname4(sv, gv, prefix, TRUE);
}
-/* XXX compatibility with versions <= 5.003. */
+/* compatibility with versions <= 5.003. */
void
-Perl_gv_fullname(pTHX_ SV *sv, GV *gv)
+Perl_gv_fullname(pTHX_ SV *sv, const GV *gv)
{
- gv_fullname3(sv, gv, sv == (SV*)gv ? "*" : "");
+ gv_fullname3(sv, gv, sv == (const SV*)gv ? "*" : "");
}
-/* XXX compatibility with versions <= 5.003. */
+/* compatibility with versions <= 5.003. */
void
-Perl_gv_efullname(pTHX_ SV *sv, GV *gv)
+Perl_gv_efullname(pTHX_ SV *sv, const GV *gv)
{
gv_efullname3(sv, gv, sv == (SV*)gv ? "*" : "");
}