Skip to content

Commit 8b21738

Browse files
committed
pp_subst - make mortalcopy directly
1 parent 631efeb commit 8b21738

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

0 commit comments

Comments
 (0)