diff options
author | Karl <khw@karl.(none)> | 2009-01-18 15:34:58 -0700 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-01-19 09:29:27 +0100 |
commit | 7bf7986364dc86acb86c5d83e7512b8dbdcb0165 (patch) | |
tree | f876493112f7120d15555d6cd0ea79116b54843c /pp_ctl.c | |
parent | 642d3d283bbbcadf2460de3a8aac4b1943137ece (diff) | |
download | perl-7bf7986364dc86acb86c5d83e7512b8dbdcb0165.tar.gz |
Combine sv_utf8_upgrade with a following grow
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -511,8 +511,7 @@ PP(pp_formline) if (!targ_is_utf8 && DO_UTF8(tmpForm)) { SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget)); *t = '\0'; - sv_utf8_upgrade(PL_formtarget); - SvGROW(PL_formtarget, SvCUR(PL_formtarget) + fudge + 1); + sv_utf8_upgrade_flags_grow(PL_formtarget, SV_GMAGIC, fudge + 1); t = SvEND(PL_formtarget); targ_is_utf8 = TRUE; } @@ -695,8 +694,8 @@ PP(pp_formline) if (!targ_is_utf8) { SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget)); *t = '\0'; - sv_utf8_upgrade(PL_formtarget); - SvGROW(PL_formtarget, SvCUR(PL_formtarget) + fudge + 1); + sv_utf8_upgrade_flags_grow(PL_formtarget, SV_GMAGIC, + fudge + 1); t = SvEND(PL_formtarget); targ_is_utf8 = TRUE; } @@ -807,7 +806,7 @@ PP(pp_formline) t - SvPVX_const(PL_formtarget)); targ_is_utf8 = TRUE; /* Don't need get magic. */ - sv_utf8_upgrade_flags(PL_formtarget, 0); + sv_utf8_upgrade_nomg(PL_formtarget); } else { SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget)); |