diff --git a/embed.fnc b/embed.fnc index efe62e6502b7..847226ffcc9c 100644 --- a/embed.fnc +++ b/embed.fnc @@ -3785,7 +3785,7 @@ Adip |bool |utf8_to_bytes_overwrite \ Adip |bool |utf8_to_bytes_temp_pv \ |NN U8 const **s_ptr \ |NN STRLEN *lenp -EMXp |U8 * |utf16_to_utf8 |NN U8 *p \ +Emp |U8 * |utf16_to_utf8 |NN U8 *p \ |NN U8 *d \ |Size_t bytelen \ |NN Size_t *newlen @@ -3803,7 +3803,7 @@ EXpx |U8 * |utf8_to_utf16_base \ |NN Size_t *newlen \ |const bool high \ |const bool low -EMXp |U8 * |utf16_to_utf8_reversed \ +Emp |U8 * |utf16_to_utf8_reversed \ |NN U8 *p \ |NN U8 *d \ |Size_t bytelen \ diff --git a/embed.h b/embed.h index fa647eadca0a..d3823463d64a 100644 --- a/embed.h +++ b/embed.h @@ -2377,6 +2377,10 @@ # define Perl_whichsig(mTHX,a) whichsig(a) # define thread_locale_init() Perl_thread_locale_init(aTHX) # define thread_locale_term() Perl_thread_locale_term(aTHX) +# if defined(PERL_CORE) || defined(PERL_EXT) +# define Perl_utf16_to_utf8(mTHX,a,b,c,d) utf16_to_utf8(a,b,c,d) +# define Perl_utf16_to_utf8_reversed(mTHX,a,b,c,d) utf16_to_utf8_reversed(a,b,c,d) +# endif # if defined(PERL_DONT_CREATE_GVSV) # define Perl_gv_SVadd(mTHX,a) gv_SVadd(a) # endif @@ -2476,6 +2480,10 @@ # define Perl_uvchr_to_utf8_flags_msgs uvchr_to_utf8_flags_msgs # define Perl_uvoffuni_to_utf8_flags uvoffuni_to_utf8_flags # define Perl_whichsig whichsig +# if defined(PERL_CORE) || defined(PERL_EXT) +# define Perl_utf16_to_utf8 utf16_to_utf8 +# define Perl_utf16_to_utf8_reversed utf16_to_utf8_reversed +# endif # if defined(PERL_DONT_CREATE_GVSV) # define Perl_gv_SVadd gv_SVadd # endif diff --git a/proto.h b/proto.h index b74a9c7ef985..6888e469508f 100644 --- a/proto.h +++ b/proto.h @@ -5328,15 +5328,9 @@ Perl_upg_version(pTHX_ SV *ver, bool qv); #define PERL_ARGS_ASSERT_UPG_VERSION \ assert(ver) -#define PERL_ARGS_ASSERT_UTF16_TO_UTF8 \ - assert(p); assert(d); assert(newlen) - #define PERL_ARGS_ASSERT_UTF16_TO_UTF8_BASE \ assert(p); assert(d); assert(newlen) -#define PERL_ARGS_ASSERT_UTF16_TO_UTF8_REVERSED \ - assert(p); assert(d); assert(newlen) - /* PERL_CALLCONV U8 * Perl_utf8_hop_back(const U8 *s, SSize_t off, const U8 * const start) __attribute__warn_unused_result__; */ @@ -6119,12 +6113,12 @@ Perl_skipspace_flags(pTHX_ char *s, U32 flags) __attribute__warn_unused_result__; PERL_CALLCONV MAGIC * Perl_sv_magicext_mglob(pTHX_ SV *sv); -PERL_CALLCONV U8 * -Perl_utf16_to_utf8(pTHX_ U8 *p, U8 *d, Size_t bytelen, Size_t *newlen); +/* PERL_CALLCONV U8 * +Perl_utf16_to_utf8(pTHX_ U8 *p, U8 *d, Size_t bytelen, Size_t *newlen); */ PERL_CALLCONV U8 * Perl_utf16_to_utf8_base(pTHX_ U8 *p, U8 *d, Size_t bytelen, Size_t *newlen, const bool high, const bool low); -PERL_CALLCONV U8 * -Perl_utf16_to_utf8_reversed(pTHX_ U8 *p, U8 *d, Size_t bytelen, Size_t *newlen); +/* PERL_CALLCONV U8 * +Perl_utf16_to_utf8_reversed(pTHX_ U8 *p, U8 *d, Size_t bytelen, Size_t *newlen); */ PERL_CALLCONV U8 * Perl_utf8_to_utf16_base(pTHX_ U8 *s, U8 *d, Size_t bytelen, Size_t *newlen, const bool high, const bool low); PERL_CALLCONV bool diff --git a/utf8.c b/utf8.c index e2fdc1abc8c6..30f68403a5ed 100644 --- a/utf8.c +++ b/utf8.c @@ -3455,22 +3455,6 @@ Perl_utf16_to_utf8_base(pTHX_ U8* p, U8* d, Size_t bytelen, Size_t *newlen, return d; } -U8* -Perl_utf16_to_utf8(pTHX_ U8* p, U8* d, Size_t bytelen, Size_t *newlen) -{ - PERL_ARGS_ASSERT_UTF16_TO_UTF8; - - return utf16_to_utf8(p, d, bytelen, newlen); -} - -U8* -Perl_utf16_to_utf8_reversed(pTHX_ U8* p, U8* d, Size_t bytelen, Size_t *newlen) -{ - PERL_ARGS_ASSERT_UTF16_TO_UTF8_REVERSED; - - return utf16_to_utf8_reversed(p, d, bytelen, newlen); -} - /* * Convert UTF-8 to native UTF-16. Called via the macros utf8_to_utf16() for * big-endian and utf8_to_utf16_reversed() for little-endian,