Skip to content

Commit 71404d3

Browse files
committed
Prefer utf8_to_bytes_overwrite to utf8_to_bytes
The latter has never lost its experimental status
1 parent 63da182 commit 71404d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2789,7 +2789,7 @@ S_scomplement(pTHX_ SV *targ, SV *sv)
27892789
tmps = (U8*)SvPV_nomg(TARG, len);
27902790

27912791
if (SvUTF8(TARG)) {
2792-
if (len && ! utf8_to_bytes(tmps, &len)) {
2792+
if (len && ! utf8_to_bytes_overwrite(&tmps, &len)) {
27932793
Perl_croak(aTHX_ FATAL_ABOVE_FF_MSG, PL_op_desc[PL_op->op_type]);
27942794
}
27952795
SvCUR_set(TARG, len);

sv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3644,7 +3644,7 @@ Perl_sv_utf8_downgrade_flags(pTHX_ SV *const sv, const bool fail_ok, const U32 f
36443644
}
36453645
s = (U8 *) SvPV_flags(sv, len, mg_flags);
36463646

3647-
if (!utf8_to_bytes(s, &len)) {
3647+
if (!utf8_to_bytes_overwrite(&s, &len)) {
36483648
if (fail_ok)
36493649
return FALSE;
36503650
else {

0 commit comments

Comments
 (0)