We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 631efeb commit 8b21738Copy full SHA for 8b21738
pp_hot.c
@@ -5374,8 +5374,7 @@ PP(pp_subst)
5374
if (dstr) {
5375
/* replacement needing upgrading? */
5376
if (DO_UTF8(TARG) && !doutf8) {
5377
- nsv = sv_newmortal();
5378
- SvSetSV(nsv, dstr);
+ nsv = sv_mortalcopy_flags(dstr, SV_GMAGIC|SV_DO_COW_SVSETSV);
5379
sv_utf8_upgrade(nsv);
5380
c = SvPV_const(nsv, clen);
5381
doutf8 = TRUE;
0 commit comments