Skip to content

Commit dfaf1f0

Browse files
committed
Perl_sv_recode_to_utf8 - do mortalcopy directly
1 parent 27bfb77 commit dfaf1f0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

sv.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17053,8 +17053,7 @@ Perl_sv_recode_to_utf8(pTHX_ SV *sv, SV *encoding)
1705317053
PUSHSTACK;
1705417054
SAVETMPS;
1705517055
if (SvPADTMP(nsv)) {
17056-
nsv = sv_newmortal();
17057-
SvSetSV_nosteal(nsv, sv);
17056+
nsv = sv_mortalcopy_flags(sv, SV_GMAGIC|SV_NOSTEAL|SV_DO_COW_SVSETSV);
1705817057
}
1705917058
save_re_context();
1706017059
PUSHMARK(sp);

0 commit comments

Comments
 (0)