Skip to content

Commit c392526

Browse files
committed
pp_subst - make mortalcopy directly
1 parent 10a0971 commit c392526

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
@@ -5357,8 +5357,7 @@ PP(pp_subst)
53575357
if (dstr) {
53585358
/* replacement needing upgrading? */
53595359
if (DO_UTF8(TARG) && !doutf8) {
5360-
nsv = sv_newmortal();
5361-
SvSetSV(nsv, dstr);
5360+
nsv = sv_mortalcopy_flags(dstr, SV_GMAGIC|SV_DO_COW_SVSETSV);
53625361
sv_utf8_upgrade(nsv);
53635362
c = SvPV_const(nsv, clen);
53645363
doutf8 = TRUE;

0 commit comments

Comments
 (0)