From acb25fddc9e86e87874ef43e6d2dd7a317e4bda7 Mon Sep 17 00:00:00 2001 From: David Mitchell Date: Sat, 28 May 2011 15:59:05 +0100 Subject: 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. --- pp_ctl.c | 4 ++-- 1 file 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; -- cgit v1.2.1