diff --git a/embed.fnc b/embed.fnc index fbe1aef0179a..a7bd19a72bf3 100644 --- a/embed.fnc +++ b/embed.fnc @@ -3772,7 +3772,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 @@ -3790,7 +3790,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 ae046a6173e8..52f180e306ec 100644 --- a/embed.h +++ b/embed.h @@ -2376,6 +2376,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 @@ -2475,6 +2479,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 6e4ae660c7bf..44fd7d13f86c 100644 --- a/proto.h +++ b/proto.h @@ -5406,20 +5406,16 @@ Perl_upg_version(pTHX_ SV *ver, bool qv); #define PERL_ARGS_ASSERT_UPG_VERSION \ assert(ver) -PERL_CALLCONV U8 * -Perl_utf16_to_utf8(pTHX_ U8 *p, U8 *d, Size_t bytelen, Size_t *newlen); -#define PERL_ARGS_ASSERT_UTF16_TO_UTF8 \ - assert(p); assert(d); assert(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); #define PERL_ARGS_ASSERT_UTF16_TO_UTF8_BASE \ assert(p); assert(d); assert(newlen) -PERL_CALLCONV U8 * -Perl_utf16_to_utf8_reversed(pTHX_ U8 *p, U8 *d, Size_t bytelen, Size_t *newlen); -#define PERL_ARGS_ASSERT_UTF16_TO_UTF8_REVERSED \ - assert(p); assert(d); assert(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_hop_back(const U8 *s, SSize_t off, const U8 * const start) diff --git a/utf8.c b/utf8.c index f7f1f1a199e2..5ffeb9ac4097 100644 --- a/utf8.c +++ b/utf8.c @@ -3454,22 +3454,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,