This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
dump.c: Don’t dump GvFLAGS as part of GP
authorFather Chrysostomos <sprout@cpan.org>
Mon, 15 Sep 2014 16:34:41 +0000 (09:34 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 15 Sep 2014 21:49:17 +0000 (14:49 -0700)
The flags are not actually stored in the GP.  Dumping them as part of
it implies that they are shared between globs that share the same GP,
which is not the case.

dump.c

diff --git a/dump.c b/dump.c
index 015bc49..bc455f4 100644 (file)
--- a/dump.c
+++ b/dump.c
@@ -2030,6 +2030,7 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
        }
        Perl_dump_indent(aTHX_ level, file, "  NAMELEN = %"IVdf"\n", (IV)GvNAMELEN(sv));
        do_hv_dump (level, file, "  GvSTASH", GvSTASH(sv));
        }
        Perl_dump_indent(aTHX_ level, file, "  NAMELEN = %"IVdf"\n", (IV)GvNAMELEN(sv));
        do_hv_dump (level, file, "  GvSTASH", GvSTASH(sv));
+       Perl_dump_indent(aTHX_ level, file, "  FLAGS = 0x%"UVxf"\n", (UV)GvFLAGS(sv));
        Perl_dump_indent(aTHX_ level, file, "  GP = 0x%"UVxf"\n", PTR2UV(GvGP(sv)));
        if (!GvGP(sv))
            break;
        Perl_dump_indent(aTHX_ level, file, "  GP = 0x%"UVxf"\n", PTR2UV(GvGP(sv)));
        if (!GvGP(sv))
            break;
@@ -2043,7 +2044,6 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
        Perl_dump_indent(aTHX_ level, file, "    CVGEN = 0x%"UVxf"\n", (UV)GvCVGEN(sv));
        Perl_dump_indent(aTHX_ level, file, "    LINE = %"IVdf"\n", (IV)GvLINE(sv));
        Perl_dump_indent(aTHX_ level, file, "    FILE = \"%s\"\n", GvFILE(sv));
        Perl_dump_indent(aTHX_ level, file, "    CVGEN = 0x%"UVxf"\n", (UV)GvCVGEN(sv));
        Perl_dump_indent(aTHX_ level, file, "    LINE = %"IVdf"\n", (IV)GvLINE(sv));
        Perl_dump_indent(aTHX_ level, file, "    FILE = \"%s\"\n", GvFILE(sv));
-       Perl_dump_indent(aTHX_ level, file, "    FLAGS = 0x%"UVxf"\n", (UV)GvFLAGS(sv));
        do_gv_dump (level, file, "    EGV", GvEGV(sv));
        break;
     case SVt_PVIO:
        do_gv_dump (level, file, "    EGV", GvEGV(sv));
        break;
     case SVt_PVIO: