summaryrefslogtreecommitdiff
path: root/dump.c
diff options
context:
space:
mode:
authorSteve Peters <steve@fisharerojo.org>2005-04-18 14:09:25 -0500
committerNicholas Clark <nick@ccl4.org>2005-04-19 09:55:51 +0000
commitb162af07ec759e1ba6b84569e4963bc5c289d75f (patch)
treedae58f745e70011d6b87525617543b26a5ff39fe /dump.c
parent9660f4819671f0b9100e5eabfa988ead3e799a1e (diff)
downloadperl-b162af07ec759e1ba6b84569e4963bc5c289d75f.tar.gz
Refactoring to Sv*_set() macros - patch #5
Message-ID: <20050419000925.GA21640@mccoy.peters.homeunix.org> Date: Mon, 18 Apr 2005 19:09:25 -0500 p4raw-id: //depot/perl@24248
Diffstat (limited to 'dump.c')
-rw-r--r--dump.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/dump.c b/dump.c
index 0cff00bcef..cc500e09f0 100644
--- a/dump.c
+++ b/dump.c
@@ -229,7 +229,7 @@ Perl_sv_peek(pTHX_ SV *sv)
if (SvROK(sv)) {
sv_catpv(t, "\\");
if (SvCUR(t) + unref > 10) {
- SvCUR(t) = unref + 3;
+ SvCUR_set(t, unref + 3);
*SvEND(t) = '\0';
sv_catpv(t, "...");
goto finish;
@@ -1200,8 +1200,10 @@ Perl_do_sv_dump(pTHX_ I32 level, PerlIO *file, SV *sv, I32 nest, I32 maxnest, bo
if ((type != SVt_PVHV) && SvUTF8(sv))
sv_catpv(d, "UTF8");
- if (*(SvEND(d) - 1) == ',')
- SvPVX(d)[--SvCUR(d)] = '\0';
+ if (*(SvEND(d) - 1) == ',') {
+ SvCUR_set(d, SvCUR(d) - 1);
+ SvPVX(d)[SvCUR(d)] = '\0';
+ }
sv_catpv(d, ")");
s = SvPVX(d);