X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=dump.c;h=724baf8bd3acd084020c9ae156d45661d2b842d7;hb=a37eaad4a1b6f0ad86c6d3d07c6f0368a3d4577c;hp=1d2dd2b2832f4061f12aa8cf5e5f73b8b73109a9;hpb=ad64d0ecd555e97c5a216efca1ec5a96b7fd0b34;p=p5sagit%2Fp5-mst-13.2.git diff --git a/dump.c b/dump.c index 1d2dd2b..724baf8 100644 --- a/dump.c +++ b/dump.c @@ -9,8 +9,10 @@ */ /* - * "'You have talked long in your sleep, Frodo,' said Gandalf gently, 'and - * it has not been hard for me to read your mind and memory.'" + * 'You have talked long in your sleep, Frodo,' said Gandalf gently, 'and + * it has not been hard for me to read your mind and memory.' + * + * [p.220 of _The Lord of the Rings_, II/i: "Many Meetings"] */ /* This file contains utility routines to dump the contents of SV and OP @@ -110,7 +112,7 @@ Perl_dump_packsubs(pTHX_ const HV *stash) for (i = 0; i <= (I32) HvMAX(stash); i++) { const HE *entry; for (entry = HvARRAY(stash)[i]; entry; entry = HeNEXT(entry)) { - const GV * const gv = (GV*)HeVAL(entry); + const GV * const gv = (const GV *)HeVAL(entry); if (SvTYPE(gv) != SVt_PVGV || !GvGP(gv)) continue; if (GvCVu(gv)) @@ -530,6 +532,8 @@ Perl_sv_peek(pTHX_ SV *sv) finish: while (unref--) sv_catpv(t, ")"); + if (PL_tainting && SvTAINTED(sv)) + sv_catpv(t, " [tainted]"); return SvPV_nolen(t); } @@ -1046,7 +1050,7 @@ Perl_do_op_dump(pTHX_ I32 level, PerlIO *file, const OP *o) UTF-8 cleanliness of the dump file handle? */ SvUTF8_on(tmpsv); #endif - gv_fullname3(tmpsv, (GV*)cSVOPo->op_sv, NULL); + gv_fullname3(tmpsv, MUTABLE_GV(cSVOPo->op_sv), NULL); Perl_dump_indent(aTHX_ level, file, "GV = %s\n", SvPV_nolen_const(tmpsv)); LEAVE; @@ -2168,7 +2172,7 @@ Perl_xmldump_packsubs(pTHX_ const HV *stash) return; for (i = 0; i <= (I32) HvMAX(stash); i++) { for (entry = HvARRAY(stash)[i]; entry; entry = HeNEXT(entry)) { - GV *gv = (GV*)HeVAL(entry); + GV *gv = MUTABLE_GV(HeVAL(entry)); HV *hv; if (SvTYPE(gv) != SVt_PVGV || !GvGP(gv)) continue; @@ -2832,7 +2836,7 @@ Perl_do_op_xmldump(pTHX_ I32 level, PerlIO *file, const OP *o) ENTER; SAVEFREESV(tmpsv1); SAVEFREESV(tmpsv2); - gv_fullname3(tmpsv1, (GV*)cSVOPo->op_sv, NULL); + gv_fullname3(tmpsv1, MUTABLE_GV(cSVOPo->op_sv), NULL); s = SvPV(tmpsv1,len); sv_catxmlpvn(tmpsv2, s, len, 1); S_xmldump_attr(aTHX_ level, file, "gv=\"%s\"", SvPV(tmpsv2, len));