This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add generic _is_(uni|utf8)_FOO() function
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 2351b32..d47e5de 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -32,9 +32,18 @@ PERL_CALLCONV void   Perl_Slab_Free(pTHX_ void *op)
 #define PERL_ARGS_ASSERT_SLAB_FREE     \
        assert(op)
 
+PERL_CALLCONV bool     Perl__is_uni_FOO(pTHX_ const U8 classnum, const UV c)
+                       __attribute__warn_unused_result__;
+
 PERL_CALLCONV bool     Perl__is_uni_perl_idstart(pTHX_ UV c)
                        __attribute__warn_unused_result__;
 
+PERL_CALLCONV bool     Perl__is_utf8_FOO(pTHX_ const U8 classnum, const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT__IS_UTF8_FOO  \
+       assert(p)
+
 PERL_CALLCONV bool     Perl__is_utf8_perl_idstart(pTHX_ const U8 *p)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -1681,6 +1690,14 @@ PERL_CALLCONV bool       Perl_is_uni_alnum_lc(pTHX_ UV c)
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
+PERL_CALLCONV bool     Perl_is_uni_alnumc(pTHX_ UV c)
+                       __attribute__warn_unused_result__
+                       __attribute__pure__;
+
+PERL_CALLCONV bool     Perl_is_uni_alnumc_lc(pTHX_ UV c)
+                       __attribute__warn_unused_result__
+                       __attribute__pure__;
+
 PERL_CALLCONV bool     Perl_is_uni_alpha(pTHX_ UV c)
                        __attribute__warn_unused_result__
                        __attribute__pure__;
@@ -1690,22 +1707,32 @@ PERL_CALLCONV bool      Perl_is_uni_alpha_lc(pTHX_ UV c)
                        __attribute__pure__;
 
 PERL_CALLCONV bool     Perl_is_uni_ascii(pTHX_ UV c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
 PERL_CALLCONV bool     Perl_is_uni_ascii_lc(pTHX_ UV c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
 PERL_CALLCONV bool     Perl_is_uni_blank(pTHX_ UV c)
+                       __attribute__deprecated__
+                       __attribute__warn_unused_result__
+                       __attribute__pure__;
+
+PERL_CALLCONV bool     Perl_is_uni_blank_lc(pTHX_ UV c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
 PERL_CALLCONV bool     Perl_is_uni_cntrl(pTHX_ UV c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
 PERL_CALLCONV bool     Perl_is_uni_cntrl_lc(pTHX_ UV c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
@@ -1730,6 +1757,7 @@ PERL_CALLCONV bool        Perl_is_uni_idfirst(pTHX_ UV c)
                        __attribute__pure__;
 
 PERL_CALLCONV bool     Perl_is_uni_idfirst_lc(pTHX_ UV c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
@@ -1758,10 +1786,12 @@ PERL_CALLCONV bool      Perl_is_uni_punct_lc(pTHX_ UV c)
                        __attribute__pure__;
 
 PERL_CALLCONV bool     Perl_is_uni_space(pTHX_ UV c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
 PERL_CALLCONV bool     Perl_is_uni_space_lc(pTHX_ UV c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
@@ -1774,10 +1804,12 @@ PERL_CALLCONV bool      Perl_is_uni_upper_lc(pTHX_ UV c)
                        __attribute__pure__;
 
 PERL_CALLCONV bool     Perl_is_uni_xdigit(pTHX_ UV c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
 PERL_CALLCONV bool     Perl_is_uni_xdigit_lc(pTHX_ UV c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
@@ -1787,6 +1819,12 @@ PERL_CALLCONV bool       Perl_is_utf8_alnum(pTHX_ const U8 *p)
 #define PERL_ARGS_ASSERT_IS_UTF8_ALNUM \
        assert(p)
 
+PERL_CALLCONV bool     Perl_is_utf8_alnumc(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_IS_UTF8_ALNUMC        \
+       assert(p)
+
 PERL_CALLCONV bool     Perl_is_utf8_alpha(pTHX_ const U8 *p)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -1794,12 +1832,14 @@ PERL_CALLCONV bool      Perl_is_utf8_alpha(pTHX_ const U8 *p)
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_ascii(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_ASCII \
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_blank(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_BLANK \
@@ -1818,6 +1858,7 @@ PERL_CALLCONV STRLEN      Perl_is_utf8_char_buf(const U8 *buf, const U8 *buf_end)
        assert(buf); assert(buf_end)
 
 PERL_CALLCONV bool     Perl_is_utf8_cntrl(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_CNTRL \
@@ -1836,12 +1877,14 @@ PERL_CALLCONV bool      Perl_is_utf8_graph(pTHX_ const U8 *p)
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_idcont(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_IDCONT        \
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_idfirst(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_IDFIRST       \
@@ -1860,18 +1903,21 @@ PERL_CALLCONV bool      Perl_is_utf8_mark(pTHX_ const U8 *p)
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_perl_space(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_PERL_SPACE    \
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_perl_word(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_PERL_WORD     \
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_posix_digit(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_POSIX_DIGIT   \
@@ -1890,6 +1936,7 @@ PERL_CALLCONV bool        Perl_is_utf8_punct(pTHX_ const U8 *p)
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_space(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_SPACE \
@@ -1917,18 +1964,21 @@ PERL_CALLCONV bool      Perl_is_utf8_upper(pTHX_ const U8 *p)
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_xdigit(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_XDIGIT        \
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_xidcont(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_XIDCONT       \
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_utf8_xidfirst(pTHX_ const U8 *p)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_IS_UTF8_XIDFIRST      \
@@ -4445,6 +4495,7 @@ PERL_CALLCONV UV  Perl_to_uni_lower(pTHX_ UV c, U8 *p, STRLEN *lenp)
        assert(p); assert(lenp)
 
 PERL_CALLCONV U32      Perl_to_uni_lower_lc(pTHX_ U32 c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
@@ -4455,6 +4506,7 @@ PERL_CALLCONV UV  Perl_to_uni_title(pTHX_ UV c, U8 *p, STRLEN *lenp)
        assert(p); assert(lenp)
 
 PERL_CALLCONV U32      Perl_to_uni_title_lc(pTHX_ U32 c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
@@ -4465,6 +4517,7 @@ PERL_CALLCONV UV  Perl_to_uni_upper(pTHX_ UV c, U8 *p, STRLEN *lenp)
        assert(p); assert(lenp)
 
 PERL_CALLCONV U32      Perl_to_uni_upper_lc(pTHX_ U32 c)
+                       __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__;
 
@@ -6114,12 +6167,11 @@ STATIC void     S_save_lines(pTHX_ AV *array, SV *sv)
 
 #endif
 #if defined(PERL_IN_PP_HOT_C)
-STATIC void    S_do_oddball(pTHX_ HV *hash, SV **relem, SV **firstrelem)
+STATIC void    S_do_oddball(pTHX_ SV **oddkey, SV **firstkey)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_3);
+                       __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_DO_ODDBALL    \
-       assert(hash); assert(relem); assert(firstrelem)
+       assert(oddkey); assert(firstkey)
 
 STATIC SV*     S_method_common(pTHX_ SV* meth, U32* hashp)
                        __attribute__warn_unused_result__
@@ -6744,11 +6796,8 @@ STATIC char*     S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, cons
 #define PERL_ARGS_ASSERT_FIND_BYCLASS  \
        assert(prog); assert(c); assert(s); assert(strend)
 
-PERL_STATIC_INLINE bool        S_is_utf8_X_LVT(pTHX_ const U8 *p)
-                       __attribute__warn_unused_result__
-                       __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_IS_UTF8_X_LVT \
-       assert(p)
+STATIC bool    S_isFOO_lc(pTHX_ const U8 classnum, const U8 character)
+                       __attribute__warn_unused_result__;
 
 STATIC I32     S_reg_check_named_buff_matched(pTHX_ const regexp *rex, const regnode *scan)
                        __attribute__warn_unused_result__
@@ -6757,12 +6806,13 @@ STATIC I32      S_reg_check_named_buff_matched(pTHX_ const regexp *rex, const regnode
 #define PERL_ARGS_ASSERT_REG_CHECK_NAMED_BUFF_MATCHED  \
        assert(rex); assert(scan)
 
-STATIC void    S_regcppop(pTHX_ regexp *rex)
-                       __attribute__nonnull__(pTHX_1);
+STATIC void    S_regcppop(pTHX_ regexp *rex, U32 *maxopenparen_p)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_REGCPPOP      \
-       assert(rex)
+       assert(rex); assert(maxopenparen_p)
 
-STATIC CHECKPOINT      S_regcppush(pTHX_ const regexp *rex, I32 parenfloor)
+STATIC CHECKPOINT      S_regcppush(pTHX_ const regexp *rex, I32 parenfloor, U32 maxopenparen)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_REGCPPUSH     \
        assert(rex)