ApR |I32 |is_lvalue_sub
: Used in cop.h
XopR |I32 |was_lvalue_sub
+iRn |STRLEN |_is_utf8_char_slow|NN const U8 *s|const STRLEN len
ADMpPR |U32 |to_uni_upper_lc|U32 c
ADMpPR |U32 |to_uni_title_lc|U32 c
ADMpPR |U32 |to_uni_lower_lc|U32 c
#endif
#if defined(PERL_IN_UTF8_C)
-iRn |STRLEN |is_utf8_char_slow|NN const U8 *s|const STRLEN len
sRM |UV |check_locale_boundary_crossing|NN const U8* const p|const UV result|NN U8* const ustrp|NN STRLEN *lenp
iR |bool |is_utf8_common |NN const U8 *const p|NN SV **swash|NN const char * const swashname|NULLOK SV* const invlist
sR |SV* |swatch_get |NN SV* swash|UV start|UV span
#ifdef PERL_CORE
#define Slab_Alloc(a) Perl_Slab_Alloc(aTHX_ a)
#define Slab_Free(a) Perl_Slab_Free(aTHX_ a)
+#define _is_utf8_char_slow S__is_utf8_char_slow
#define allocmy(a,b,c) Perl_allocmy(aTHX_ a,b,c)
#define amagic_is_enabled(a) Perl_amagic_is_enabled(aTHX_ a)
#define apply(a,b,c) Perl_apply(aTHX_ a,b,c)
# endif
# if defined(PERL_IN_UTF8_C)
#define check_locale_boundary_crossing(a,b,c,d) S_check_locale_boundary_crossing(aTHX_ a,b,c,d)
-#define is_utf8_char_slow S_is_utf8_char_slow
#define is_utf8_common(a,b,c,d) S_is_utf8_common(aTHX_ a,b,c,d)
#define swash_scan_list_line(a,b,c,d,e,f,g) S_swash_scan_list_line(aTHX_ a,b,c,d,e,f,g)
#define swatch_get(a,b,c) S_swatch_get(aTHX_ a,b,c)
return isALNUM_lazy_if(p,1);
}
+/*
+Tests if the first C<len> bytes of string C<s> form a valid UTF-8
+character. Note that an INVARIANT (i.e. ASCII on non-EBCDIC) character is a
+valid UTF-8 character. The number of bytes in the UTF-8 character
+will be returned if it is valid, otherwise 0.
+
+This is the "slow" version as opposed to the "fast" version which is
+the "unrolled" IS_UTF8_CHAR(). E.g. for t/uni/class.t the speed
+difference is a factor of 2 to 3. For lengths (UTF8SKIP(s)) of four
+or less you should use the IS_UTF8_CHAR(), for lengths of five or more
+you should use the _slow(). In practice this means that the _slow()
+will be used very rarely, since the maximum Unicode code point (as of
+Unicode 4.1) is U+10FFFF, which encodes in UTF-8 to four bytes. Only
+the "Perl extended UTF-8" (e.g, the infamous 'v-strings') will encode into
+five bytes or more.
+
+=cut */
+PERL_STATIC_INLINE STRLEN
+S__is_utf8_char_slow(const U8 *s, const STRLEN len)
+{
+ dTHX; /* The function called below requires thread context */
+
+ STRLEN actual_len;
+
+ PERL_ARGS_ASSERT__IS_UTF8_CHAR_SLOW;
+
+ utf8n_to_uvchr(s, len, &actual_len, UTF8_CHECK_ONLY);
+
+ return (actual_len == (STRLEN) -1) ? 0 : actual_len;
+}
+
/* ------------------------------- perl.h ----------------------------- */
/*
#define PERL_ARGS_ASSERT__IS_UTF8_FOO \
assert(p)
+PERL_STATIC_INLINE STRLEN S__is_utf8_char_slow(const U8 *s, const STRLEN len)
+ __attribute__warn_unused_result__
+ __attribute__nonnull__(1);
+#define PERL_ARGS_ASSERT__IS_UTF8_CHAR_SLOW \
+ assert(s)
+
PERL_CALLCONV bool Perl__is_utf8_mark(pTHX_ const U8 *p)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1);
#define PERL_ARGS_ASSERT_CHECK_LOCALE_BOUNDARY_CROSSING \
assert(p); assert(ustrp); assert(lenp)
-PERL_STATIC_INLINE STRLEN S_is_utf8_char_slow(const U8 *s, const STRLEN len)
- __attribute__warn_unused_result__
- __attribute__nonnull__(1);
-#define PERL_ARGS_ASSERT_IS_UTF8_CHAR_SLOW \
- assert(s)
-
PERL_STATIC_INLINE bool S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * const swashname, SV* const invlist)
__attribute__warn_unused_result__
__attribute__nonnull__(pTHX_1)
}
/*
-
-Tests if the first C<len> bytes of string C<s> form a valid UTF-8
-character. Note that an INVARIANT (i.e. ASCII on non-EBCDIC) character is a
-valid UTF-8 character. The number of bytes in the UTF-8 character
-will be returned if it is valid, otherwise 0.
-
-This is the "slow" version as opposed to the "fast" version which is
-the "unrolled" IS_UTF8_CHAR(). E.g. for t/uni/class.t the speed
-difference is a factor of 2 to 3. For lengths (UTF8SKIP(s)) of four
-or less you should use the IS_UTF8_CHAR(), for lengths of five or more
-you should use the _slow(). In practice this means that the _slow()
-will be used very rarely, since the maximum Unicode code point (as of
-Unicode 4.1) is U+10FFFF, which encodes in UTF-8 to four bytes. Only
-the "Perl extended UTF-8" (e.g, the infamous 'v-strings') will encode into
-five bytes or more.
-
-=cut */
-PERL_STATIC_INLINE STRLEN
-S_is_utf8_char_slow(const U8 *s, const STRLEN len)
-{
- dTHX; /* The function called below requires thread context */
-
- STRLEN actual_len;
-
- PERL_ARGS_ASSERT_IS_UTF8_CHAR_SLOW;
-
- utf8n_to_uvchr(s, len, &actual_len, UTF8_CHECK_ONLY);
-
- return (actual_len == (STRLEN) -1) ? 0 : actual_len;
-}
-
-/*
=for apidoc is_utf8_char_buf
Returns the number of bytes that comprise the first UTF-8 encoded character in
if (IS_UTF8_CHAR_FAST(len))
return IS_UTF8_CHAR(buf, len) ? len : 0;
- return is_utf8_char_slow(buf, len);
+ return _is_utf8_char_slow(buf, len);
}
/*
if (!IS_UTF8_CHAR(x, c))
return FALSE;
}
- else if (! is_utf8_char_slow(x, c)) {
+ else if (! _is_utf8_char_slow(x, c)) {
return FALSE;
}
x = next_char_ptr;
if (!IS_UTF8_CHAR(x, c))
c = 0;
} else
- c = is_utf8_char_slow(x, c);
+ c = _is_utf8_char_slow(x, c);
if (!c)
goto out;
}