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 5914be1 commit 91c2b99Copy full SHA for 91c2b99
pp_hot.c
@@ -5357,8 +5357,7 @@ PP(pp_subst)
5357
if (dstr) {
5358
/* replacement needing upgrading? */
5359
if (DO_UTF8(TARG) && !doutf8) {
5360
- nsv = sv_newmortal();
5361
- SvSetSV(nsv, dstr);
+ nsv = sv_mortalcopy_flags(dstr, SV_GMAGIC|SV_DO_COW_SVSETSV);
5362
sv_utf8_upgrade(nsv);
5363
c = SvPV_const(nsv, clen);
5364
doutf8 = TRUE;
0 commit comments