Change 18558 by jhi@kosh on 2003/01/22 13:05:27

        Subject: Re: slight tweak to -DR flag - display whether on tmps stack
        From: Dave Mitchell <[EMAIL PROTECTED]>
        Date: Sun, 19 Jan 2003 17:22:05 +0000
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

... //depot/perl/dump.c#133 edit

Differences ...

==== //depot/perl/dump.c#133 (text) ====
Index: perl/dump.c
--- perl/dump.c#132~18530~      Mon Jan 20 17:37:03 2003
+++ perl/dump.c Wed Jan 22 05:05:27 2003
@@ -194,10 +194,22 @@
        sv_catpv(t, "(");
        unref++;
     }
-    else if (DEBUG_R_TEST_ && SvREFCNT(sv) > 1) {
-       Perl_sv_catpvf(aTHX_ t, "<%"UVuf">", (UV)SvREFCNT(sv));
+    else if (DEBUG_R_TEST_) {
+       int is_tmp = 0;
+       I32 ix;
+       /* is this SV on the tmps stack? */
+       for (ix=PL_tmps_ix; ix>=0; ix--) {
+           if (PL_tmps_stack[ix] == sv) {
+               is_tmp = 1;
+               break;
+           }
+       }
+       if (SvREFCNT(sv) > 1)
+           Perl_sv_catpvf(aTHX_ t, "<%"UVuf"%s>", (UV)SvREFCNT(sv),
+                   is_tmp ? "T" : "");
+       else if (is_tmp)
+           sv_catpv(t, "<T>");
     }
-
 
     if (SvROK(sv)) {
        sv_catpv(t, "\\");
End of Patch.

Reply via email to