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 403fdc1 commit 3be8ac0Copy full SHA for 3be8ac0
pp_hot.c
@@ -5368,8 +5368,7 @@ PP(pp_subst)
5368
if (dstr) {
5369
/* replacement needing upgrading? */
5370
if (DO_UTF8(TARG) && !doutf8) {
5371
- nsv = sv_newmortal();
5372
- SvSetSV(nsv, dstr);
+ nsv = sv_mortalcopy_flags(dstr, SV_GMAGIC|SV_DO_COW_SVSETSV);
5373
sv_utf8_upgrade(nsv);
5374
c = SvPV_const(nsv, clen);
5375
doutf8 = TRUE;
0 commit comments