diff options
author | Steve Peters <steve@fisharerojo.org> | 2005-04-16 06:05:02 -0500 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-04-18 12:18:20 +0000 |
commit | f880fe2f705a50a69328065c7b46fe16e2c252e8 (patch) | |
tree | b6416494bb1c7d69a0aa108e470892dd09a6f3c3 /pp_ctl.c | |
parent | bfe08c74b6c277925a0a4c6d707ff24113ccca13 (diff) | |
download | perl-f880fe2f705a50a69328065c7b46fe16e2c252e8.tar.gz |
Refactoring to Sv*_set() macros - patch #4
Message-ID: <20050416160502.GA26957@mccoy.peters.homeunix.org>
plus fix to Perl_rvpv_dup assigning to an RV with SvPVX
p4raw-id: //depot/perl@24239
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -244,12 +244,12 @@ PP(pp_substcont) if (SvLEN(targ)) Safefree(SvPVX(targ)); } - SvPVX(targ) = SvPVX(dstr); + SvPV_set(targ, SvPVX(dstr)); SvCUR_set(targ, SvCUR(dstr)); SvLEN_set(targ, SvLEN(dstr)); if (DO_UTF8(dstr)) SvUTF8_on(targ); - SvPVX(dstr) = 0; + SvPV_set(dstr, (char*)0); sv_free(dstr); TAINT_IF(cx->sb_rxtainted & 1); @@ -2394,13 +2394,13 @@ PP(pp_goto) ary = AvALLOC(av); if (AvARRAY(av) != ary) { AvMAX(av) += AvARRAY(av) - AvALLOC(av); - SvPVX(av) = (char*)ary; + SvPV_set(av, (char*)ary); } if (items >= AvMAX(av) + 1) { AvMAX(av) = items - 1; Renew(ary,items+1,SV*); AvALLOC(av) = ary; - SvPVX(av) = (char*)ary; + SvPV_set(av, (char*)ary); } } ++mark; |