summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2001-03-09 13:49:31 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-09 14:38:56 +0000
commit04932ac8f7d72810cce59c52976ab33010e88b99 (patch)
treebc6507fa14063a22f27503c74bc21bfb9ed56af1 /dump.c
parent1dfe7606714789cb685cd524877388fe1e9008b4 (diff)
downloadperl-04932ac8f7d72810cce59c52976ab33010e88b99.tar.gz
Re: [ PATCH perl@8956 ] new debug option -DR shows ref counts
Message-Id: <200103091349.NAA16617@tiree.fdgroup.co.uk> p4raw-id: //depot/perl@9087
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/dump.c b/dump.c
index 680572933f..be104d6171 100644
--- a/dump.c
+++ b/dump.c
@@ -194,6 +194,11 @@ Perl_sv_peek(pTHX_ SV *sv)
sv_catpv(t, "(");
unref++;
}
+ else if (DEBUG_R_TEST && SvREFCNT(sv) > 1) {
+ sv_catpvf(t, "<%u>", SvREFCNT(sv));
+ }
+
+
if (SvROK(sv)) {
sv_catpv(t, "\\");
if (SvCUR(t) + unref > 10) {