Skip to content

Commit be98641

Browse files
committed
Merge utf8_to_uvchr_buf() and its helper
The helper adds no value
1 parent be1548c commit be98641

File tree

5 files changed

+6
-21
lines changed

5 files changed

+6
-21
lines changed

embed.fnc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3741,10 +3741,6 @@ AMdip |UV |utf8_to_uvchr_buf \
37413741
|NN const U8 *s \
37423742
|NN const U8 *send \
37433743
|NULLOK STRLEN *retlen
3744-
Cip |UV |utf8_to_uvchr_buf_helper \
3745-
|NN const U8 *s \
3746-
|NN const U8 *send \
3747-
|NULLOK STRLEN *retlen
37483744
CDbdp |UV |utf8_to_uvuni |NN const U8 *s \
37493745
|NULLOK STRLEN *retlen
37503746
: Used in perly.y

embed.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,6 @@
863863
# define utf8_to_bytes_new_pv(a,b,c) Perl_utf8_to_bytes_new_pv(aTHX,a,b,c)
864864
# define utf8_to_bytes_overwrite(a,b) Perl_utf8_to_bytes_overwrite(aTHX,a,b)
865865
# define utf8_to_bytes_temp_pv(a,b) Perl_utf8_to_bytes_temp_pv(aTHX,a,b)
866-
# define utf8_to_uvchr_buf_helper(a,b,c) Perl_utf8_to_uvchr_buf_helper(aTHX_ a,b,c)
867866
# define utf8n_to_uvchr_msgs Perl_utf8n_to_uvchr_msgs
868867
# define uvchr_to_utf8(a,b) Perl_uvchr_to_utf8(aTHX,a,b)
869868
# define uvchr_to_utf8_flags(a,b,c) Perl_uvchr_to_utf8_flags(aTHX,a,b,c)

inline.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3141,15 +3141,6 @@ PERL_STATIC_INLINE UV
31413141
Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
31423142
{
31433143
PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF;
3144-
3145-
return utf8_to_uvchr_buf_helper(s, send, retlen);
3146-
}
3147-
3148-
PERL_STATIC_INLINE UV
3149-
Perl_utf8_to_uvchr_buf_helper(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
3150-
{
3151-
PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF_HELPER;
3152-
31533144
assert(s < send);
31543145

31553146
if (! ckWARN_d(WARN_UTF8)) {

proto.h

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

utf8.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,12 @@ typedef enum {
148148
Perl_uvchr_to_utf8_flags_msgs(aTHX, d, u, f, 0)
149149
#define Perl_uvchr_to_utf8_flags_msgs(mTHX, d, u, f , m) \
150150
Perl_uvoffuni_to_utf8_flags_msgs(aTHX_ d, NATIVE_TO_UNI(u), f, m)
151-
#define utf8_to_uvchr_buf(s, e, lenp) \
152-
utf8_to_uvchr_buf_helper((const U8 *) (s), (const U8 *) e, lenp)
151+
152+
/* This is needed to cast the parameters for all those calls that had them
153+
* improperly as chars */
154+
#define utf8_to_uvchr_buf(s, e, lenp) \
155+
Perl_utf8_to_uvchr_buf(aTHX_ (const U8 *) (s), (const U8 *) e, lenp)
156+
153157
#define utf8n_to_uvchr(s, len, lenp, flags) \
154158
utf8n_to_uvchr_error(s, len, lenp, flags, 0)
155159
#define utf8n_to_uvchr_error(s, len, lenp, flags, errors) \

0 commit comments

Comments
 (0)