summaryrefslogtreecommitdiff
path: root/pp.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 /pp.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 'pp.c')
-rw-r--r--pp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/pp.c b/pp.c
index 7200eda075..3b52e7145c 100644
--- a/pp.c
+++ b/pp.c
@@ -178,9 +178,10 @@ PP(pp_rv2gv)
SvOOK_off(sv); /* backoff */
if (SvLEN(sv))
Safefree(SvPVX(sv));
- SvLEN(sv)=SvCUR(sv)=0;
+ SvLEN_set(sv, 0);
+ SvCUR_set(sv, 0);
}
- SvRV(sv) = (SV*)gv;
+ SvRV_set(sv, (SV*)gv);
SvROK_on(sv);
SvSETMAGIC(sv);
goto wasref;
@@ -493,7 +494,7 @@ S_refto(pTHX_ SV *sv)
}
rv = sv_newmortal();
sv_upgrade(rv, SVt_RV);
- SvRV(rv) = sv;
+ SvRV_set(rv, sv);
SvROK_on(rv);
return rv;
}
@@ -1494,7 +1495,7 @@ PP(pp_repeat)
MEM_WRAP_CHECK_1(max, char, oom_string_extend);
SvGROW(TARG, (count * len) + 1);
repeatcpy(SvPVX(TARG) + len, SvPVX(TARG), len, count - 1);
- SvCUR(TARG) *= count;
+ SvCUR_set(TARG, SvCUR(TARG) * count);
}
*SvEND(TARG) = '\0';
}