diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2002-12-28 22:33:16 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2002-12-28 22:33:16 +0000 |
commit | 018f84777e1627fdb7641155b51d78ace8779de9 (patch) | |
tree | f824a5911e20497b553e939100dbe6b36314c51f /dump.c | |
parent | 323eb6b51efca422d3c0a8b789bae8a333db8627 (diff) | |
download | perl-018f84777e1627fdb7641155b51d78ace8779de9.tar.gz |
A small tweak on top of #18353: don't display mg_len bytes of
mg_ptr for PERL_MAGIC_utf8 because that's not what's there.
p4raw-id: //depot/maint-5.8/perl@18359
Diffstat (limited to 'dump.c')
-rw-r--r-- | dump.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -866,9 +866,11 @@ Perl_do_magic_dump(pTHX_ I32 level, PerlIO *file, MAGIC *mg, I32 nest, I32 maxne if (mg->mg_ptr) { Perl_dump_indent(aTHX_ level, file, " MG_PTR = 0x%"UVxf, PTR2UV(mg->mg_ptr)); if (mg->mg_len >= 0) { - SV *sv = newSVpvn("", 0); - PerlIO_printf(file, " %s", pv_display(sv, mg->mg_ptr, mg->mg_len, 0, pvlim)); - SvREFCNT_dec(sv); + if (mg->mg_type != PERL_MAGIC_utf8) { + SV *sv = newSVpvn("", 0); + PerlIO_printf(file, " %s", pv_display(sv, mg->mg_ptr, mg->mg_len, 0, pvlim)); + SvREFCNT_dec(sv); + } } else if (mg->mg_len == HEf_SVKEY) { PerlIO_puts(file, " => HEf_SVKEY\n"); |