Skip to content

Commit bf95ea0

Browse files
committed
pp_subst - make mortalcopy directly
1 parent 0dfe226 commit bf95ea0

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
@@ -5375,8 +5375,7 @@ PP(pp_subst)
53755375
if (dstr) {
53765376
/* replacement needing upgrading? */
53775377
if (DO_UTF8(TARG) && !doutf8) {
5378-
nsv = sv_newmortal();
5379-
SvSetSV(nsv, dstr);
5378+
nsv = sv_mortalcopy_flags(dstr, SV_GMAGIC|SV_DO_COW_SVSETSV);
53805379
sv_utf8_upgrade(nsv);
53815380
c = SvPV_const(nsv, clen);
53825381
doutf8 = TRUE;

0 commit comments

Comments
 (0)