Skip to content

Commit 211c07b

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 d70bab4 commit 211c07b

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
@@ -3856,7 +3856,7 @@ Admp |U8 * |uvchr_to_utf8_flags_msgs \
38563856
|UV uv \
38573857
|UV flags \
38583858
|NULLOK HV **msgs
3859-
CMdp |U8 * |uvoffuni_to_utf8_flags \
3859+
Cdmp |U8 * |uvoffuni_to_utf8_flags \
38603860
|NN U8 *d \
38613861
|UV uv \
38623862
|UV flags

embed.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2372,6 +2372,7 @@
23722372
# define Perl_uvchr_to_utf8(mTHX,a,b) uvchr_to_utf8(a,b)
23732373
# define Perl_uvchr_to_utf8_flags(mTHX,a,b,c) uvchr_to_utf8_flags(a,b,c)
23742374
# define Perl_uvchr_to_utf8_flags_msgs(mTHX,a,b,c,d) uvchr_to_utf8_flags_msgs(a,b,c,d)
2375+
# define Perl_uvoffuni_to_utf8_flags(mTHX,a,b,c) uvoffuni_to_utf8_flags(a,b,c)
23752376
# define Perl_whichsig(mTHX,a) whichsig(a)
23762377
# define thread_locale_init() Perl_thread_locale_init(aTHX)
23772378
# define thread_locale_term() Perl_thread_locale_term(aTHX)
@@ -2472,6 +2473,7 @@
24722473
# define Perl_uvchr_to_utf8 uvchr_to_utf8
24732474
# define Perl_uvchr_to_utf8_flags uvchr_to_utf8_flags
24742475
# define Perl_uvchr_to_utf8_flags_msgs uvchr_to_utf8_flags_msgs
2476+
# define Perl_uvoffuni_to_utf8_flags uvoffuni_to_utf8_flags
24752477
# define Perl_whichsig whichsig
24762478
# if defined(PERL_DONT_CREATE_GVSV)
24772479
# define Perl_gv_SVadd gv_SVadd

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)