In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/3cedd9d93070bd6f0cb074a3013165cd9a630fca?hp=5dca92787911972e6827cbb3173c9b1f44ea8613>
- Log ----------------------------------------------------------------- commit 3cedd9d93070bd6f0cb074a3013165cd9a630fca Author: Karl Williamson <[email protected]> Date: Mon May 5 22:41:14 2014 -0600 Make is_utf8_char_buf() a macro This function is now more efficiently implemented as a synonym for isUTF8_CHAR(). We retain the Perl_is_utf8_char_buf() function for code that calls it that way. ----------------------------------------------------------------------- Summary of changes: embed.fnc | 2 +- embed.h | 1 - proto.h | 4 ++-- utf8.c | 2 +- utf8.h | 2 ++ 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/embed.fnc b/embed.fnc index 35756e4..30b1087 100644 --- a/embed.fnc +++ b/embed.fnc @@ -687,7 +687,7 @@ ADMpPR |bool |is_uni_punct_lc|UV c ADMpPR |bool |is_uni_xdigit_lc|UV c Anpd |bool |is_ascii_string|NN const U8 *s|STRLEN len AnpdD |STRLEN |is_utf8_char |NN const U8 *s -Anpd |STRLEN |is_utf8_char_buf|NN const U8 *buf|NN const U8 *buf_end +Abmnpd |STRLEN |is_utf8_char_buf|NN const U8 *buf|NN const U8 *buf_end Anpd |bool |is_utf8_string |NN const U8 *s|STRLEN len Anpdmb |bool |is_utf8_string_loc|NN const U8 *s|STRLEN len|NULLOK const U8 **ep Anpd |bool |is_utf8_string_loclen|NN const U8 *s|STRLEN len|NULLOK const U8 **ep|NULLOK STRLEN *el diff --git a/embed.h b/embed.h index 5ad8ef6..4a3dbbd 100644 --- a/embed.h +++ b/embed.h @@ -268,7 +268,6 @@ #define is_utf8_ascii(a) Perl_is_utf8_ascii(aTHX_ a) #define is_utf8_blank(a) Perl_is_utf8_blank(aTHX_ a) #define is_utf8_char Perl_is_utf8_char -#define is_utf8_char_buf Perl_is_utf8_char_buf #define is_utf8_cntrl(a) Perl_is_utf8_cntrl(aTHX_ a) #define is_utf8_digit(a) Perl_is_utf8_digit(aTHX_ a) #define is_utf8_graph(a) Perl_is_utf8_graph(aTHX_ a) diff --git a/proto.h b/proto.h index d4a8589..e5b7478 100644 --- a/proto.h +++ b/proto.h @@ -1992,9 +1992,9 @@ PERL_CALLCONV STRLEN Perl_is_utf8_char(const U8 *s) #define PERL_ARGS_ASSERT_IS_UTF8_CHAR \ assert(s) -PERL_CALLCONV STRLEN Perl_is_utf8_char_buf(const U8 *buf, const U8 *buf_end) +/* PERL_CALLCONV STRLEN Perl_is_utf8_char_buf(const U8 *buf, const U8 *buf_end) __attribute__nonnull__(1) - __attribute__nonnull__(2); + __attribute__nonnull__(2); */ #define PERL_ARGS_ASSERT_IS_UTF8_CHAR_BUF \ assert(buf); assert(buf_end) diff --git a/utf8.c b/utf8.c index 8d62b5f..1b684f2 100644 --- a/utf8.c +++ b/utf8.c @@ -310,7 +310,7 @@ Perl_uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags) /* =for apidoc is_utf8_char_buf -This is identical to the macro isUTF8_CHAR. +This is identical to the macro L</isUTF8_CHAR>. =cut */ diff --git a/utf8.h b/utf8.h index 924380d..74e7d48 100644 --- a/utf8.h +++ b/utf8.h @@ -649,6 +649,8 @@ machines) is a valid UTF-8 character. ? is_UTF8_CHAR_utf8_no_length_checks(s) \ : _is_utf8_char_slow(s, e)) +#define is_utf8_char_buf(buf, buf_end) isUTF8_CHAR(buf, buf_end) + /* Do not use; should be deprecated. Use isUTF8_CHAR() instead; this is * retained solely for backwards compatibility */ #define IS_UTF8_CHAR(p, n) (isUTF8_CHAR(p, (p) + (n)) == n) -- Perl5 Master Repository
