Cache-Memcached-Fast
view release on metacpan or search on metacpan
UTF8SKIP(s))))
#endif
#ifndef UTF8_SKIP
#define UTF8_SKIP(s) UTF8SKIP(s)
#endif
#endif
#if 'A' == 65
#ifndef UTF8_IS_INVARIANT
#define UTF8_IS_INVARIANT(c) isASCII(c)
#endif
#else
#ifndef UTF8_IS_INVARIANT
#define UTF8_IS_INVARIANT(c) (isASCII(c) || isCNTRL_L1(c))
#endif
#endif
#ifndef UVCHR_IS_INVARIANT
#define UVCHR_IS_INVARIANT(c) UTF8_IS_INVARIANT(c)
#endif
#ifdef UVCHR_IS_INVARIANT
#if 'A' != 65 || UVSIZE < 8
#define D_PPP_UVCHR_SKIP_UPPER(c) 7
#else
#define D_PPP_UVCHR_SKIP_UPPER(c) \
(((WIDEST_UTYPE) (c)) < \
(((WIDEST_UTYPE) 1) << (6 * D_PPP_BYTE_INFO_BITS)) ? 7 : 13)
#endif
#ifndef UVCHR_SKIP
#define UVCHR_SKIP(c) \
UVCHR_IS_INVARIANT(c) ? 1 : \
(WIDEST_UTYPE) (c) < (32 * (1U << ( D_PPP_BYTE_INFO_BITS))) ? 2 : \
(WIDEST_UTYPE) (c) < (16 * (1U << (2 * D_PPP_BYTE_INFO_BITS))) ? 3 : \
(WIDEST_UTYPE) (c) < ( 8 * (1U << (3 * D_PPP_BYTE_INFO_BITS))) ? 4 : \
(WIDEST_UTYPE) (c) < ( 4 * (1U << (4 * D_PPP_BYTE_INFO_BITS))) ? 5 : \
(WIDEST_UTYPE) (c) < ( 2 * (1U << (5 * D_PPP_BYTE_INFO_BITS))) ? 6 : \
D_PPP_UVCHR_SKIP_UPPER(c)
#endif
#endif
#ifdef is_ascii_string
#ifndef is_invariant_string
#define is_invariant_string(s,l) is_ascii_string(s,l)
#endif
#ifndef is_utf8_invariant_string
#define is_utf8_invariant_string(s,l) is_ascii_string(s,l)
#endif
#endif
#ifdef ibcmp_utf8
#ifndef foldEQ_utf8
#define foldEQ_utf8(s1,pe1,l1,u1,s2,pe2,l2,u2) \
cBOOL(! ibcmp_utf8(s1,pe1,l1,u1,s2,pe2,l2,u2))
#endif
#endif
#if defined(is_utf8_string) && defined(UTF8SKIP)
#ifndef isUTF8_CHAR
#define isUTF8_CHAR(s, e) ( \
(e) <= (s) || ! is_utf8_string(s, UTF8_SAFE_SKIP(s, e)) \
? 0 \
: UTF8SKIP(s))
#endif
#endif
#if 'A' == 65
#ifndef BOM_UTF8
#define BOM_UTF8 "\xEF\xBB\xBF"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
#define REPLACEMENT_CHARACTER_UTF8 "\xEF\xBF\xBD"
#endif
#elif '^' == 95
#ifndef BOM_UTF8
#define BOM_UTF8 "\xDD\x73\x66\x73"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
#define REPLACEMENT_CHARACTER_UTF8 "\xDD\x73\x73\x71"
#endif
#elif '^' == 176
#ifndef BOM_UTF8
#define BOM_UTF8 "\xDD\x72\x65\x72"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
#define REPLACEMENT_CHARACTER_UTF8 "\xDD\x72\x72\x70"
#endif
#else
#error Unknown character set
#endif
#if (PERL_BCDVERSION < 0x5035010)
#undef utf8_to_uvchr_buf
#endif
#if (PERL_BCDVERSION >= 0x5006001) && ! defined(utf8_to_uvchr_buf)
#if defined(utf8n_to_uvchr) || defined(utf8_to_uvchr) || defined(utf8_to_uv)
#if defined(utf8n_to_uvchr)
#define D_PPP_utf8_to_uvchr_buf_callee utf8n_to_uvchr
#elif \
defined(utf8_to_uv) && defined(utf8_to_uv_simple)
#define D_PPP_utf8_to_uvchr_buf_callee utf8_to_uv
#elif defined(utf8_to_uvchr)
#define D_PPP_utf8_to_uvchr_buf_callee(s, curlen, retlen, flags) \
utf8_to_uvchr((U8 *)(s), (retlen))
#else
#define D_PPP_utf8_to_uvchr_buf_callee(s, curlen, retlen, flags) \
utf8_to_uv((U8 *)(s), (retlen))
#endif
#endif
#if defined(NEED_utf8_to_uvchr_buf)
static UV DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 * s, const U8 * send, STRLEN * retlen);
static
#else
extern UV DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 * s, const U8 * send, STRLEN * retlen);
#endif
#if defined(NEED_utf8_to_uvchr_buf) || defined(NEED_utf8_to_uvchr_buf_GLOBAL)
#ifdef utf8_to_uvchr_buf
#undef utf8_to_uvchr_buf
#endif
#define utf8_to_uvchr_buf(a,b,c) DPPP_(my_utf8_to_uvchr_buf)(aTHX_ a,b,c)
#define Perl_utf8_to_uvchr_buf DPPP_(my_utf8_to_uvchr_buf)
UV
DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen)
{
#if (PERL_BCDVERSION >= 0x5031004)
#if (PERL_BCDVERSION != 0x5035009)
if (send <= s) s = send = (U8 *) "?";
return Perl_utf8_to_uvchr_buf_helper(aTHX_ s, send, retlen);
#else
if (send > s) return Perl_utf8_to_uvchr_buf_helper(aTHX_ s, send, retlen);
if (! ckWARN_d(WARN_UTF8)) {
if (retlen) *retlen = 0;
return UNICODE_REPLACEMENT;
}
else {
s = send = (U8 *) "?";
(void) Perl__utf8n_to_uvchr_msgs_helper(s, 0, NULL, 0, NULL, NULL);
if (retlen) *retlen = (STRLEN) -1;
return 0;
}
#endif
#else
UV ret;
STRLEN curlen;
( run in 1.379 second using v1.01-cache-2.11-cpan-39bf76dae61 )