summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-05-20 22:53:00 +0000
committerNicholas Clark <nick@ccl4.org>2005-05-20 22:53:00 +0000
commit8d2f45362e368d7dd455b476c924dcbcc02d845b (patch)
tree59781bff974e66889d582302526cc2308af6d0c1 /dump.c
parentaec614a53fcaa2a63038ec4dcf0fcd1cda92fd31 (diff)
downloadperl-8d2f45362e368d7dd455b476c924dcbcc02d845b.tar.gz
Remove PMROOT and replace it with a small shell script. Er, magic.
(PMROOT being needed to implement bare C<reset> - how often do you use that?) p4raw-id: //depot/perl@24522
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/dump.c b/dump.c
index 8bbacb1997..627c5c0477 100644
--- a/dump.c
+++ b/dump.c
@@ -892,6 +892,7 @@ static const struct { const char type; const char *name; } magic_names[] = {
{ PERL_MAGIC_arylen, "arylen(#)" },
{ PERL_MAGIC_glob, "glob(*)" },
{ PERL_MAGIC_pos, "pos(.)" },
+ { PERL_MAGIC_symtab, "symtab(:)" },
{ PERL_MAGIC_backref, "backref(<)" },
{ PERL_MAGIC_overload, "overload(A)" },
{ PERL_MAGIC_bm, "bm(B)" },
@@ -1419,8 +1420,12 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
Perl_dump_indent(aTHX_ level, file, " MAX = %"IVdf"\n", (IV)HvMAX(sv));
Perl_dump_indent(aTHX_ level, file, " RITER = %"IVdf"\n", (IV)HvRITER(sv));
Perl_dump_indent(aTHX_ level, file, " EITER = 0x%"UVxf"\n", PTR2UV(HvEITER(sv)));
- if (HvPMROOT(sv))
- Perl_dump_indent(aTHX_ level, file, " PMROOT = 0x%"UVxf"\n", PTR2UV(HvPMROOT(sv)));
+ {
+ MAGIC *mg = mg_find(sv, PERL_MAGIC_symtab);
+ if (mg && mg->mg_obj) {
+ Perl_dump_indent(aTHX_ level, file, " PMROOT = 0x%"UVxf"\n", PTR2UV(mg->mg_obj));
+ }
+ }
if (HvNAME(sv))
Perl_dump_indent(aTHX_ level, file, " NAME = \"%s\"\n", HvNAME(sv));
if (nest < maxnest && !HvEITER(sv)) { /* Try to preserve iterator */