summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2002-08-15 01:10:35 +0100
committerhv <hv@crypt.org>2002-08-17 02:07:24 +0000
commit765f542df20317f47bb284c276cd0abfb50dcfd6 (patch)
treebe92963942496ba900bdfb32c5b522ba355aafb0 /dump.c
parent6f12eb6d2a1dfaf441504d869b27d2e40ef4966a (diff)
downloadperl-765f542df20317f47bb284c276cd0abfb50dcfd6.tar.gz
Copy On Write
Message-id: <20020815001035.A69079@plum.flirble.org> specify "-Accflags='-DPERL_COPY_ON_WRITE'" to use p4raw-id: //depot/perl@17728
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/dump.c b/dump.c
index 50573bacb0..0081135c50 100644
--- a/dump.c
+++ b/dump.c
@@ -1083,12 +1083,22 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
return;
}
if (type >= SVt_PVIV || type == SVt_IV) {
- if (SvIsUV(sv))
+ if (SvIsUV(sv)
+#ifdef PERL_COPY_ON_WRITE
+ || SvIsCOW(sv)
+#endif
+ )
Perl_dump_indent(aTHX_ level, file, " UV = %"UVuf, (UV)SvUVX(sv));
else
Perl_dump_indent(aTHX_ level, file, " IV = %"IVdf, (IV)SvIVX(sv));
if (SvOOK(sv))
PerlIO_printf(file, " (OFFSET)");
+#ifdef PERL_COPY_ON_WRITE
+ if (SvIsCOW_shared_hash(sv))
+ PerlIO_printf(file, " (HASH)");
+ else if (SvIsCOW_normal(sv))
+ PerlIO_printf(file, " (COW from 0x%"UVxf")", (UV)SvUVX(sv));
+#endif
PerlIO_putc(file, '\n');
}
if (type >= SVt_PVNV || type == SVt_NV) {