summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2005-03-21 18:35:55 -0600
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-03-24 16:25:58 +0000
commite1ec3a884f8d8c64eb7e391b2a363f47cbeed570 (patch)
tree13e83e61449ed542f309f1cd88e7ed42778ca543 /dump.c
parent2bbb3949e88673e7f0574ab70254a46d776242e9 (diff)
downloadperl-e1ec3a884f8d8c64eb7e391b2a363f47cbeed570.tar.gz
Third consting batch
Message-Id: <2f14220e7101a03f7659dbe79a03b115@petdance.com> p4raw-id: //depot/perl@24074
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/dump.c b/dump.c
index 0ae1a440dc..8143bfbe71 100644
--- a/dump.c
+++ b/dump.c
@@ -53,17 +53,17 @@ Perl_dump_all(pTHX)
}
void
-Perl_dump_packsubs(pTHX_ HV *stash)
+Perl_dump_packsubs(pTHX_ const HV *stash)
{
I32 i;
- HE *entry;
if (!HvARRAY(stash))
return;
for (i = 0; i <= (I32) HvMAX(stash); i++) {
+ const HE *entry;
for (entry = HvARRAY(stash)[i]; entry; entry = HeNEXT(entry)) {
- GV *gv = (GV*)HeVAL(entry);
- HV *hv;
+ const GV *gv = (GV*)HeVAL(entry);
+ const HV *hv;
if (SvTYPE(gv) != SVt_PVGV || !GvGP(gv))
continue;
if (GvCVu(gv))
@@ -78,7 +78,7 @@ Perl_dump_packsubs(pTHX_ HV *stash)
}
void
-Perl_dump_sub(pTHX_ GV *gv)
+Perl_dump_sub(pTHX_ const GV *gv)
{
SV *sv = sv_newmortal();
@@ -95,7 +95,7 @@ Perl_dump_sub(pTHX_ GV *gv)
}
void
-Perl_dump_form(pTHX_ GV *gv)
+Perl_dump_form(pTHX_ const GV *gv)
{
SV *sv = sv_newmortal();
@@ -114,15 +114,15 @@ Perl_dump_eval(pTHX)
}
char *
-Perl_pv_display(pTHX_ SV *dsv, char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
+Perl_pv_display(pTHX_ SV *dsv, const char *pv, STRLEN cur, STRLEN len, STRLEN pvlim)
{
- int truncated = 0;
- int nul_terminated = len > cur && pv[cur] == '\0';
+ const bool nul_terminated = len > cur && pv[cur] == '\0';
+ bool truncated = 0;
sv_setpvn(dsv, "\"", 1);
for (; cur--; pv++) {
if (pvlim && SvCUR(dsv) >= pvlim) {
- truncated++;
+ truncated = 1;
break;
}
switch (*pv) {
@@ -981,7 +981,7 @@ Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, MAGIC *mg, I32 nest, I32 maxne
{
int n;
- char *name = 0;
+ const char *name = 0;
for (n=0; magic_names[n].name; n++) {
if (mg->mg_type == magic_names[n].type) {
name = magic_names[n].name;
@@ -1056,7 +1056,7 @@ Perl_magic_dump(pTHX_ MAGIC *mg)
}
void
-Perl_do_hv_dump(pTHX_ I32 level, PerlIO *file, char *name, HV *sv)
+Perl_do_hv_dump(pTHX_ I32 level, PerlIO *file, const char *name, HV *sv)
{
Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv));
if (sv && HvNAME(sv))
@@ -1066,7 +1066,7 @@ Perl_do_hv_dump(pTHX_ I32 level, PerlIO *file, char *name, HV *sv)
}
void
-Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, char *name, GV *sv)
+Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv)
{
Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv));
if (sv && GvNAME(sv))
@@ -1076,7 +1076,7 @@ Perl_do_gv_dump(pTHX_ I32 level, PerlIO *file, char *name, GV *sv)
}
void
-Perl_do_gvgv_dump(pTHX_ I32 level, PerlIO *file, char *name, GV *sv)
+Perl_do_gvgv_dump(pTHX_ I32 level, PerlIO *file, const char *name, GV *sv)
{
Perl_dump_indent(aTHX_ level, file, "%s = 0x%"UVxf, name, PTR2UV(sv));
if (sv && GvNAME(sv)) {
@@ -1093,7 +1093,7 @@ void
Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bool dumpops, STRLEN pvlim)
{
SV *d;
- char *s;
+ const char *s;
U32 flags;
U32 type;
@@ -1420,7 +1420,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
while ((he = hv_iternext_flags(hv, HV_ITERNEXT_WANTPLACEHOLDERS))
&& count--) {
SV *elt, *keysv;
- char *keypv;
+ const char *keypv;
STRLEN len;
U32 hash = HeHASH(he);
@@ -1463,7 +1463,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
do_dump_pad(level+1, file, CvPADLIST(sv), 0);
}
{
- CV *outside = CvOUTSIDE(sv);
+ const CV *outside = CvOUTSIDE(sv);
Perl_dump_indent(aTHX_ level, file, " OUTSIDE = 0x%"UVxf" (%s)\n",
PTR2UV(outside),
(!outside ? "null"
@@ -1629,7 +1629,7 @@ Perl_debop(pTHX_ OP *o)
STATIC CV*
S_deb_curcv(pTHX_ I32 ix)
{
- PERL_CONTEXT *cx = &cxstack[ix];
+ const PERL_CONTEXT *cx = &cxstack[ix];
if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT)
return cx->blk_sub.cv;
else if (CxTYPE(cx) == CXt_EVAL && !CxTRYBLOCK(cx))
@@ -1652,7 +1652,7 @@ Perl_watch(pTHX_ char **addr)
}
STATIC void
-S_debprof(pTHX_ OP *o)
+S_debprof(pTHX_ const OP *o)
{
if (CopSTASH_eq(PL_curcop, PL_debstash) && !DEBUG_J_TEST_)
return;