diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2006-05-20 21:07:34 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2006-05-20 21:07:34 +0000 |
commit | 926fc7b69e6a11a3d2f5a7eb21ac98fcca45819c (patch) | |
tree | 0ff366874ea26807d653df15d86360a946e1e3cb /dump.c | |
parent | f2ab5a41215d98b800435a2513b81bb0da0e651d (diff) | |
download | perl-926fc7b69e6a11a3d2f5a7eb21ac98fcca45819c.tar.gz |
don't try to dump GVish parts of an LV if it hasn't got GVish parts
p4raw-id: //depot/perl@28260
Diffstat (limited to 'dump.c')
-rw-r--r-- | dump.c | 24 |
1 files changed, 14 insertions, 10 deletions
@@ -1237,16 +1237,19 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo if (HvREHASH(sv)) sv_catpv(d, "REHASH,"); if (flags & SVphv_CLONEABLE) sv_catpv(d, "CLONEABLE,"); break; - case SVt_PVGV: case SVt_PVLV: - if (GvINTRO(sv)) sv_catpv(d, "INTRO,"); - if (GvMULTI(sv)) sv_catpv(d, "MULTI,"); - if (GvUNIQUE(sv)) sv_catpv(d, "UNIQUE,"); - if (GvASSUMECV(sv)) sv_catpv(d, "ASSUMECV,"); - if (GvIN_PAD(sv)) sv_catpv(d, "IN_PAD,"); + case SVt_PVGV: + case SVt_PVLV: + if (isGV_with_GP(sv)) { + if (GvINTRO(sv)) sv_catpv(d, "INTRO,"); + if (GvMULTI(sv)) sv_catpv(d, "MULTI,"); + if (GvUNIQUE(sv)) sv_catpv(d, "UNIQUE,"); + if (GvASSUMECV(sv)) sv_catpv(d, "ASSUMECV,"); + if (GvIN_PAD(sv)) sv_catpv(d, "IN_PAD,"); + } if (SvPAD_OUR(sv)) sv_catpv(d, "OUR,"); if (SvPAD_STATE(sv)) sv_catpv(d, "STATE,"); if (SvPAD_TYPED(sv)) sv_catpv(d, "TYPED,"); - if (GvIMPORTED(sv)) { + if (isGV_with_GP(sv) && GvIMPORTED(sv)) { sv_catpv(d, "IMPORT"); if (GvIMPORTED(sv) == GVf_IMPORTED) sv_catpv(d, "ALL,"); @@ -1610,7 +1613,8 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo if (nest < maxnest && (CvCLONE(sv) || CvCLONED(sv))) do_sv_dump(level+1, file, (SV*)CvOUTSIDE(sv), nest+1, maxnest, dumpops, pvlim); break; - case SVt_PVGV: case SVt_PVLV: + case SVt_PVGV: + case SVt_PVLV: if (type == SVt_PVLV) { Perl_dump_indent(aTHX_ level, file, " TYPE = %c\n", LvTYPE(sv)); Perl_dump_indent(aTHX_ level, file, " TARGOFF = %"IVdf"\n", (IV)LvTARGOFF(sv)); @@ -1620,11 +1624,11 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo do_sv_dump(level+1, file, LvTARG(sv), nest+1, maxnest, dumpops, pvlim); } + if (!isGV_with_GP(sv)) + break; Perl_dump_indent(aTHX_ level, file, " NAME = \"%s\"\n", GvNAME(sv)); Perl_dump_indent(aTHX_ level, file, " NAMELEN = %"IVdf"\n", (IV)GvNAMELEN(sv)); do_hv_dump (level, file, " GvSTASH", GvSTASH(sv)); - if (!isGV_with_GP(sv)) - break; Perl_dump_indent(aTHX_ level, file, " GP = 0x%"UVxf"\n", PTR2UV(GvGP(sv))); if (!GvGP(sv)) break; |