summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorKarl <khw@karl.(none)>2009-01-18 15:34:58 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-01-19 09:29:27 +0100
commit7bf7986364dc86acb86c5d83e7512b8dbdcb0165 (patch)
treef876493112f7120d15555d6cd0ea79116b54843c /pp_ctl.c
parent642d3d283bbbcadf2460de3a8aac4b1943137ece (diff)
downloadperl-7bf7986364dc86acb86c5d83e7512b8dbdcb0165.tar.gz
Combine sv_utf8_upgrade with a following grow
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index e9b4bfc79c..799683d059 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -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));