Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uvoffuni_to_utf8_flags_msgs(): Return proper bit #22779

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions embed.fnc
Original file line number Diff line number Diff line change
Expand Up @@ -3760,6 +3760,17 @@ Cp |U8 * |uvoffuni_to_utf8_flags_msgs \
|UV input_uv \
|const UV flags \
|NULLOK HV **msgs

Admp |U8 * |uv_to_utf8 |NN U8 *d \
|UV uv
Admp |U8 * |uv_to_utf8_flags \
|NN U8 *d \
|UV uv \
|UV flags
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 \
Expand Down
3 changes: 3 additions & 0 deletions embed.h
Original file line number Diff line number Diff line change
Expand Up @@ -861,6 +861,9 @@
# define utf8_to_bytes(a,b) Perl_utf8_to_bytes(aTHX_ a,b)
# define utf8_to_uvchr_buf_helper(a,b,c) Perl_utf8_to_uvchr_buf_helper(aTHX_ a,b,c)
# define utf8n_to_uvchr_msgs Perl_utf8n_to_uvchr_msgs
# define uv_to_utf8(a,b) Perl_uv_to_utf8(aTHX,a,b)
# define uv_to_utf8_flags(a,b,c) Perl_uv_to_utf8_flags(aTHX,a,b,c)
# define uv_to_utf8_msgs(a,b,c,d) Perl_uv_to_utf8_msgs(aTHX,a,b,c,d)
# define uvchr_to_utf8(a,b) Perl_uvchr_to_utf8(aTHX,a,b)
# define uvchr_to_utf8_flags(a,b,c) Perl_uvchr_to_utf8_flags(aTHX,a,b,c)
# define uvchr_to_utf8_flags_msgs(a,b,c,d) Perl_uvchr_to_utf8_flags_msgs(aTHX,a,b,c,d)
Expand Down
9 changes: 9 additions & 0 deletions proto.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion utf8.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ Perl_uvoffuni_to_utf8_flags_msgs(pTHX_ U8 *d, UV input_uv, UV flags, HV** msgs)
if (msgs) {
*msgs = new_msg_hv(Perl_form(aTHX_ format, input_uv),
category,
UNICODE_GOT_PERL_EXTENDED);
(flags & UNICODE_WARN_PERL_EXTENDED)
? UNICODE_GOT_PERL_EXTENDED
: UNICODE_GOT_SUPER);
}
else {
Perl_ck_warner_d(aTHX_ category, format, input_uv);
Expand Down
15 changes: 10 additions & 5 deletions utf8.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,17 @@ typedef enum {
#define uvoffuni_to_utf8_flags(d,uv,flags) \
uvoffuni_to_utf8_flags_msgs(d, uv, flags, 0)

#define Perl_uvchr_to_utf8(mTHX, d, u) \
Perl_uvchr_to_utf8_flags(aTHX, d, u, 0)
#define Perl_uvchr_to_utf8_flags(mTHX, d, u, f) \
Perl_uvchr_to_utf8_flags_msgs(aTHX, d, u, f, 0)
#define Perl_uvchr_to_utf8_flags_msgs(mTHX, d, u, f , m) \
#define Perl_uv_to_utf8(mTHX, d, u) \
Perl_uv_to_utf8_flags(aTHX, d, u, 0)
#define Perl_uv_to_utf8_flags(mTHX, d, u, f) \
Perl_uv_to_utf8_msgs(aTHX, d, u, f, 0)
#define Perl_uv_to_utf8_msgs(mTHX, d, u, f , m) \
Perl_uvoffuni_to_utf8_flags_msgs(aTHX_ d, NATIVE_TO_UNI(u), f, m)

#define Perl_uvchr_to_utf8 Perl_uv_to_utf8
#define Perl_uvchr_to_utf8_flags Perl_uv_to_utf8_flags
#define Perl_uvchr_to_utf8_flags_msgs Perl_uv_to_utf8_msgs

#define utf8_to_uvchr_buf(s, e, lenp) \
utf8_to_uvchr_buf_helper((const U8 *) (s), (const U8 *) e, lenp)
#define utf8n_to_uvchr(s, len, lenp, flags) \
Expand Down
Loading