diff options
author | Andy Lester <andy@petdance.com> | 2005-03-21 18:35:55 -0600 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2005-03-24 16:25:58 +0000 |
commit | e1ec3a884f8d8c64eb7e391b2a363f47cbeed570 (patch) | |
tree | 13e83e61449ed542f309f1cd88e7ed42778ca543 /gv.c | |
parent | 2bbb3949e88673e7f0574ab70254a46d776242e9 (diff) | |
download | perl-e1ec3a884f8d8c64eb7e391b2a363f47cbeed570.tar.gz |
Third consting batch
Message-Id: <2f14220e7101a03f7659dbe79a03b115@petdance.com>
p4raw-id: //depot/perl@24074
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -106,7 +106,7 @@ void Perl_gv_init(pTHX_ GV *gv, HV *stash, const char *name, STRLEN len, int multi) { register GP *gp; - bool doproto = SvTYPE(gv) > SVt_NULL; + const bool doproto = SvTYPE(gv) > SVt_NULL; char *proto = (doproto && SvPOK(gv)) ? SvPVX(gv) : NULL; sv_upgrade((SV*)gv, SVt_PVGV); @@ -487,7 +487,7 @@ Perl_gv_autoload4(pTHX_ HV *stash, const char *name, STRLEN len, I32 method) HV* varstash; GV* vargv; SV* varsv; - char *packname = ""; + const char *packname = ""; if (len == autolen && strnEQ(name, autoload, autolen)) return Nullgv; @@ -881,7 +881,7 @@ Perl_gv_fetchpvn_flags(pTHX_ const char *nambeg, STRLEN full_len, I32 flags, if ((add & GV_ADDMULTI) && strEQ(nambeg,"AnyDBM_File::ISA") && AvFILLp(av) == -1) { - char *pname; + const char *pname; av_push(av, newSVpvn(pname = "NDBM_File",9)); gv_stashpvn(pname, 9, TRUE); av_push(av, newSVpvn(pname = "DB_File",7)); @@ -1167,7 +1167,7 @@ Perl_gv_fullname(pTHX_ SV *sv, const GV *gv) void Perl_gv_efullname(pTHX_ SV *sv, const GV *gv) { - gv_efullname3(sv, gv, sv == (SV*)gv ? "*" : ""); + gv_efullname3(sv, gv, sv == (const SV*)gv ? "*" : ""); } IO * @@ -1194,7 +1194,6 @@ Perl_newIO(pTHX) void Perl_gv_check(pTHX_ HV *stash) { - register HE *entry; register I32 i; register GV *gv; HV *hv; @@ -1202,6 +1201,7 @@ Perl_gv_check(pTHX_ HV *stash) if (!HvARRAY(stash)) return; for (i = 0; i <= (I32) HvMAX(stash); i++) { + const HE *entry; for (entry = HvARRAY(stash)[i]; entry; entry = HeNEXT(entry)) { if (HeKEY(entry)[HeKLEN(entry)-1] == ':' && (gv = (GV*)HeVAL(entry)) && isGV(gv) && (hv = GvHV(gv))) @@ -1210,7 +1210,7 @@ Perl_gv_check(pTHX_ HV *stash) gv_check(hv); /* nested package */ } else if (isALPHA(*HeKEY(entry))) { - char *file; + const char *file; gv = (GV*)HeVAL(entry); if (SvTYPE(gv) != SVt_PVGV || GvMULTI(gv)) continue; @@ -1243,7 +1243,7 @@ Perl_gv_check(pTHX_ HV *stash) } GV * -Perl_newGVgen(pTHX_ char *pack) +Perl_newGVgen(pTHX_ const char *pack) { return gv_fetchpv(Perl_form(aTHX_ "%s::_GEN_%ld", pack, (long)PL_gensym++), TRUE, SVt_PVGV); @@ -1376,10 +1376,10 @@ Perl_Gv_AMupdate(pTHX_ HV *stash) for (i = 1; i < lim; i++) amt.table[i] = Nullcv; for (; i < NofAMmeth; i++) { - char *cooky = (char*)PL_AMG_names[i]; + const char *cooky = PL_AMG_names[i]; /* Human-readable form, for debugging: */ - char *cp = (i >= DESTROY_amg ? cooky : AMG_id2name(i)); - STRLEN l = strlen(cooky); + const char *cp = (i >= DESTROY_amg ? cooky : AMG_id2name(i)); + const STRLEN l = strlen(cooky); DEBUG_o( Perl_deb(aTHX_ "Checking overloading of `%s' in package `%.256s'\n", cp, HvNAME(stash)) ); @@ -1477,7 +1477,7 @@ Perl_gv_handler(pTHX_ HV *stash, I32 id) "Inherited AUTOLOAD for a non-method deprecated", since our caller is going through a function call, not a method call. So return the CV for AUTOLOAD, setting $AUTOLOAD. */ - GV *gv = gv_fetchmethod(stash, (char*)PL_AMG_names[id]); + GV *gv = gv_fetchmethod(stash, PL_AMG_names[id]); if (gv && GvCV(gv)) return GvCV(gv); @@ -1843,7 +1843,7 @@ bool Perl_is_gv_magical_sv(pTHX_ SV *name, U32 flags) { STRLEN len; - char *temp = SvPV(name, len); + const char *temp = SvPV(name, len); return is_gv_magical(temp, len, flags); } |