Skip to content

Commit 52422b9

Browse files
committed
Convert Perl_uvoffuni_to_utf8_flags to a macro
The function is hereby removed in favor of calling the plain uvoffuni_to_utf8_flags macro that already exists
1 parent 5df7a2e commit 52422b9

File tree

5 files changed

+20
-29
lines changed

5 files changed

+20
-29
lines changed

embed.fnc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3827,7 +3827,7 @@ Adm |U8 * |uvchr_to_utf8_flags_msgs \
38273827
|UV uv \
38283828
|UV flags \
38293829
|NULLOK HV **msgs
3830-
CMdp |U8 * |uvoffuni_to_utf8_flags \
3830+
Cdmp |U8 * |uvoffuni_to_utf8_flags \
38313831
|NN U8 *d \
38323832
|UV uv \
38333833
|UV flags

embed.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2331,6 +2331,7 @@
23312331
# define Perl_sv_utf8_downgrade(mTHX,a,b) sv_utf8_downgrade(a,b)
23322332
# define Perl_sv_utf8_upgrade(mTHX,a) sv_utf8_upgrade(a)
23332333
# define Perl_uv_to_utf8_msgs(mTHX,a,b,c,d) uv_to_utf8_msgs(a,b,c,d)
2334+
# define Perl_uvoffuni_to_utf8_flags(mTHX,a,b,c) uvoffuni_to_utf8_flags(a,b,c)
23342335
# define thread_locale_init() Perl_thread_locale_init(aTHX)
23352336
# define thread_locale_term() Perl_thread_locale_term(aTHX)
23362337
# if defined(PERL_DONT_CREATE_GVSV)
@@ -2395,6 +2396,7 @@
23952396
# define Perl_sv_utf8_downgrade sv_utf8_downgrade
23962397
# define Perl_sv_utf8_upgrade sv_utf8_upgrade
23972398
# define Perl_uv_to_utf8_msgs uv_to_utf8_msgs
2399+
# define Perl_uvoffuni_to_utf8_flags uvoffuni_to_utf8_flags
23982400
# if defined(PERL_DONT_CREATE_GVSV)
23992401
# define Perl_gv_SVadd gv_SVadd
24002402
# endif

proto.h

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

utf8.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -105,30 +105,6 @@ S_new_msg_hv(pTHX_ const char * const message, /* The message text */
105105
return msg_hv;
106106
}
107107

108-
/*
109-
=for apidoc uvoffuni_to_utf8_flags
110-
111-
THIS FUNCTION SHOULD BE USED IN ONLY VERY SPECIALIZED CIRCUMSTANCES.
112-
Instead, B<Almost all code should use L<perlapi/uv_to_utf8> or
113-
L<perlapi/uv_to_utf8_flags>>.
114-
115-
This function is like them, but the input is a strict Unicode
116-
(as opposed to native) code point. Only in very rare circumstances should code
117-
not be using the native code point.
118-
119-
For details, see the description for L<perlapi/uv_to_utf8_flags>.
120-
121-
=cut
122-
*/
123-
124-
U8 *
125-
Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, const UV flags)
126-
{
127-
PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS;
128-
129-
return uvoffuni_to_utf8_flags_msgs(d, uv, flags, NULL);
130-
}
131-
132108
/* All these formats take a single UV code point argument */
133109
const char surrogate_cp_format[] = "UTF-16 surrogate U+%04" UVXf;
134110
const char nonchar_cp_format[] = "Unicode non-character U+%04" UVXf

utf8.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,21 @@ typedef enum {
139139
#define is_ascii_string(s, len) is_utf8_invariant_string(s, len)
140140
#define is_invariant_string(s, len) is_utf8_invariant_string(s, len)
141141

142+
/*
143+
=for apidoc uvoffuni_to_utf8_flags
144+
145+
THIS FUNCTION SHOULD BE USED IN ONLY VERY SPECIALIZED CIRCUMSTANCES.
146+
Instead, B<Almost all code should use L<perlapi/uv_to_utf8> or
147+
L<perlapi/uv_to_utf8_flags>>.
148+
149+
This function is like them, but the input is a strict Unicode
150+
(as opposed to native) code point. Only in very rare circumstances should code
151+
not be using the native code point.
152+
153+
For details, see the description for L<perlapi/uv_to_utf8_flags>.
154+
155+
=cut
156+
*/
142157
#define uvoffuni_to_utf8_flags(d,uv,flags) \
143158
uvoffuni_to_utf8_flags_msgs(d, uv, flags, 0)
144159

0 commit comments

Comments
 (0)