Skip to content

Commit 9b4bbe3

Browse files
committed
perl.h: Use utf8_to-uv_or_die not utf8_to_uvchr_buf
This is in the _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG macro. That macro had some complexity due to the unwield API of utf8_to_uvchr_buf, which can now be removed.
1 parent 3f29e37 commit 9b4bbe3

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

perl.h

+5-6
Original file line numberDiff line numberDiff line change
@@ -7557,13 +7557,12 @@ the plain locale pragma without a parameter (S<C<use locale>>) is in effect.
75577557
# define _CHECK_AND_OUTPUT_WIDE_LOCALE_UTF8_MSG(s, send) \
75587558
STMT_START { /* Check if to warn before doing the conversion work */\
75597559
if (! IN_UTF8_CTYPE_LOCALE && ckWARN(WARN_LOCALE)) { \
7560-
UV cp = utf8_to_uvchr_buf((U8 *) (s), (U8 *) (send), NULL); \
7560+
UV cp = utf8_to_uv_or_die((const U8 *) (s), \
7561+
(const U8 *) (send), \
7562+
NULL); \
75617563
Perl_warner(aTHX_ packWARN(WARN_LOCALE), \
7562-
"Wide character (U+%" UVXf ") in %s", \
7563-
(cp == 0) \
7564-
? UNICODE_REPLACEMENT \
7565-
: (UV) cp, \
7566-
OP_DESC(PL_op)); \
7564+
"Wide character (U+%" UVXf ") in %s", \
7565+
(UV) cp, OP_DESC(PL_op)); \
75677566
} \
75687567
} STMT_END
75697568

0 commit comments

Comments
 (0)