From e01bb3de8420340a7f645fdb7305e2a27bda9ad1 Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Wed, 23 Jul 2025 07:47:16 -0600 Subject: [PATCH] Attempt to remove deprecated uvuni_to_utf8() It has been deprecated since 5.32, emitting a compiler warning if actually called (for most modern compilers). I think it is time to see what breaks when we remove it. --- embed.fnc | 2 -- embed.h | 1 - mathoms.c | 8 -------- pod/perldelta.pod | 4 ++++ proto.h | 6 ------ 5 files changed, 4 insertions(+), 17 deletions(-) diff --git a/embed.fnc b/embed.fnc index abc9f6234058..9d0bafa6037c 100644 --- a/embed.fnc +++ b/embed.fnc @@ -3847,8 +3847,6 @@ Admp |U8 * |uv_to_utf8_msgs|NN U8 *d \ |UV uv \ |UV flags \ |NULLOK HV **msgs -CDbp |U8 * |uvuni_to_utf8 |NN U8 *d \ - |UV uv EXdpx |bool |validate_proto |NN SV *name \ |NULLOK SV *proto \ |bool warn \ diff --git a/embed.h b/embed.h index 5da76b34c8b1..18302886dbb9 100644 --- a/embed.h +++ b/embed.h @@ -929,7 +929,6 @@ # define utf8_to_uvchr(a,b) Perl_utf8_to_uvchr(aTHX_ a,b) # define utf8_to_uvuni(a,b) Perl_utf8_to_uvuni(aTHX_ a,b) # define utf8n_to_uvuni(a,b,c,d) Perl_utf8n_to_uvuni(aTHX_ a,b,c,d) -# define uvuni_to_utf8(a,b) Perl_uvuni_to_utf8(aTHX_ a,b) # endif # if defined(PERL_CORE) # define PerlLIO_dup2_cloexec(a,b) Perl_PerlLIO_dup2_cloexec(aTHX_ a,b) diff --git a/mathoms.c b/mathoms.c index 1cd6865aed6f..4b43ec7a43ba 100644 --- a/mathoms.c +++ b/mathoms.c @@ -180,14 +180,6 @@ Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen) return NATIVE_TO_UNI(valid_utf8_to_uvchr(s, retlen)); } -U8 * -Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv) -{ - PERL_ARGS_ASSERT_UVUNI_TO_UTF8; - - return uvoffuni_to_utf8_flags(d, uv, 0); -} - /* =for apidoc_section $unicode =for apidoc utf8n_to_uvuni diff --git a/pod/perldelta.pod b/pod/perldelta.pod index 2193bff2f318..66f50846678b 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -351,6 +351,10 @@ well. XXX +=item * + +Removed the deprecated (since 5.32) function C + =back =head1 Selected Bug Fixes diff --git a/proto.h b/proto.h index 13b1f685ed43..31332235ee14 100644 --- a/proto.h +++ b/proto.h @@ -6036,12 +6036,6 @@ Perl_utf8n_to_uvuni(pTHX_ const U8 *s, STRLEN curlen, STRLEN *retlen, U32 flags) # define PERL_ARGS_ASSERT_UTF8N_TO_UVUNI \ assert(s) -PERL_CALLCONV U8 * -Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv) - __attribute__deprecated__; -# define PERL_ARGS_ASSERT_UVUNI_TO_UTF8 \ - assert(d) - # if defined(PERL_IN_MATHOMS_C) || defined(PERL_IN_OP_C) || \ defined(PERL_IN_PERLY_C) || defined(PERL_IN_TOKE_C) PERL_CALLCONV OP *