Skip to content

Commit 91cbfde

Browse files
committed
Perl_sv_recode_to_utf8 - do mortalcopy directly
1 parent bbe1246 commit 91cbfde

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
@@ -16980,8 +16980,7 @@ Perl_sv_recode_to_utf8(pTHX_ SV *sv, SV *encoding)
1698016980
PUSHSTACK;
1698116981
SAVETMPS;
1698216982
if (SvPADTMP(nsv)) {
16983-
nsv = sv_newmortal();
16984-
SvSetSV_nosteal(nsv, sv);
16983+
nsv = sv_mortalcopy_flags(sv, SV_GMAGIC|SV_NOSTEAL|SV_DO_COW_SVSETSV);
1698516984
}
1698616985
save_re_context();
1698716986
PUSHMARK(sp);

0 commit comments

Comments
 (0)