Skip to content

Commit a2740d4

Browse files
committed
Perl_sv_recode_to_utf8 - do mortalcopy directly
1 parent 648b23b commit a2740d4

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
@@ -17000,8 +17000,7 @@ Perl_sv_recode_to_utf8(pTHX_ SV *sv, SV *encoding)
1700017000
PUSHSTACK;
1700117001
SAVETMPS;
1700217002
if (SvPADTMP(nsv)) {
17003-
nsv = sv_newmortal();
17004-
SvSetSV_nosteal(nsv, sv);
17003+
nsv = sv_mortalcopy_flags(sv, SV_GMAGIC|SV_NOSTEAL|SV_DO_COW_SVSETSV);
1700517004
}
1700617005
save_re_context();
1700717006
PUSHMARK(sp);

0 commit comments

Comments
 (0)