Prefer utf8_to_bytes_overwrite to utf8_to_bytes

The latter has never lost its experimental status
This commit is contained in:
Karl Williamson 2025-01-28 12:02:37 -07:00 committed by Karl Williamson
parent 63da182b91
commit 71404d33b1
2 changed files with 2 additions and 2 deletions

2
pp.c
View File

@ -2789,7 +2789,7 @@ S_scomplement(pTHX_ SV *targ, SV *sv)
tmps = (U8*)SvPV_nomg(TARG, len);
if (SvUTF8(TARG)) {
if (len && ! utf8_to_bytes(tmps, &len)) {
if (len && ! utf8_to_bytes_overwrite(&tmps, &len)) {
Perl_croak(aTHX_ FATAL_ABOVE_FF_MSG, PL_op_desc[PL_op->op_type]);
}
SvCUR_set(TARG, len);

2
sv.c
View File

@ -3644,7 +3644,7 @@ Perl_sv_utf8_downgrade_flags(pTHX_ SV *const sv, const bool fail_ok, const U32 f
}
s = (U8 *) SvPV_flags(sv, len, mg_flags);
if (!utf8_to_bytes(s, &len)) {
if (!utf8_to_bytes_overwrite(&s, &len)) {
if (fail_ok)
return FALSE;
else {