summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2011-05-28 15:59:05 +0100
committerDavid Mitchell <davem@iabyn.com>2011-05-29 20:21:53 +0100
commitacb25fddc9e86e87874ef43e6d2dd7a317e4bda7 (patch)
treee457211f6f8527ddee233b3014f2d4ed41ac3a9f
parenta2c0032b06b9fa4a6d26a50dc6e736c05e4fcb09 (diff)
downloadperl-acb25fddc9e86e87874ef43e6d2dd7a317e4bda7.tar.gz
pp_formline: don't do get mg on PL_formtarget
Two of the three branches that upgrade PL_formtarget to utf8 (FF_LITERAL, FF_ITEM) do get magic while doing so, while the third (FF_LINEGLOB) doesn't. I think the first two were just co-incidental (they started out as simple sv_utf8_upgrade() calls added by 1bd51a4ce2ce8, and probably no consideration was given as to whether to use the _nomg variant instead). Make the first two no longer call magic, to be consistent with FF_LINEGLOB.
-rw-r--r--pp_ctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 271ab0549a..2f0ddcd2fe 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -630,7 +630,7 @@ PP(pp_formline)
if (!targ_is_utf8 && DO_UTF8(formsv)) {
SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget));
*t = '\0';
- sv_utf8_upgrade_flags_grow(PL_formtarget, SV_GMAGIC, fudge + 1);
+ sv_utf8_upgrade_flags_grow(PL_formtarget, 0, fudge + 1);
t = SvEND(PL_formtarget);
targ_is_utf8 = TRUE;
}
@@ -816,7 +816,7 @@ PP(pp_formline)
if (!targ_is_utf8) {
SvCUR_set(PL_formtarget, t - SvPVX_const(PL_formtarget));
*t = '\0';
- sv_utf8_upgrade_flags_grow(PL_formtarget, SV_GMAGIC,
+ sv_utf8_upgrade_flags_grow(PL_formtarget, 0,
fudge + 1);
t = SvEND(PL_formtarget);
targ_is_utf8 = TRUE;