Skip to content

Commit 86121c4

Browse files
committed
Perl_sv_recode_to_utf8 - do mortalcopy directly
1 parent f23f59d commit 86121c4

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
@@ -17037,8 +17037,7 @@ Perl_sv_recode_to_utf8(pTHX_ SV *sv, SV *encoding)
1703717037
PUSHSTACK;
1703817038
SAVETMPS;
1703917039
if (SvPADTMP(nsv)) {
17040-
nsv = sv_newmortal();
17041-
SvSetSV_nosteal(nsv, sv);
17040+
nsv = sv_mortalcopy_flags(sv, SV_GMAGIC|SV_NOSTEAL|SV_DO_COW_SVSETSV);
1704217041
}
1704317042
save_re_context();
1704417043
PUSHMARK(sp);

0 commit comments

Comments
 (0)