Skip to content

Commit 3be8ac0

Browse files
committed
pp_subst - make mortalcopy directly
1 parent 403fdc1 commit 3be8ac0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pp_hot.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5368,8 +5368,7 @@ PP(pp_subst)
53685368
if (dstr) {
53695369
/* replacement needing upgrading? */
53705370
if (DO_UTF8(TARG) && !doutf8) {
5371-
nsv = sv_newmortal();
5372-
SvSetSV(nsv, dstr);
5371+
nsv = sv_mortalcopy_flags(dstr, SV_GMAGIC|SV_DO_COW_SVSETSV);
53735372
sv_utf8_upgrade(nsv);
53745373
c = SvPV_const(nsv, clen);
53755374
doutf8 = TRUE;

0 commit comments

Comments
 (0)