This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
toke.c: Fix bugs where UTF-8 is turned on in mid chunk
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 3c3a6ce..076df94 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -2331,6 +2331,7 @@ PERL_CALLCONV_NO_RET void Perl_noperl_die(const char* pat, ...)
        assert(pat)
 
 PERL_CALLCONV int      Perl_nothreadhook(pTHX);
+PERL_CALLCONV void     Perl_notify_parser_that_changed_to_utf8(pTHX);
 PERL_CALLCONV OP*      Perl_oopsAV(pTHX_ OP* o)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_OOPSAV        \
@@ -2343,6 +2344,7 @@ PERL_CALLCONV OP* Perl_oopsHV(pTHX_ OP* o)
 
 PERL_CALLCONV OP*      Perl_op_append_elem(pTHX_ I32 optype, OP* first, OP* last);
 PERL_CALLCONV OP*      Perl_op_append_list(pTHX_ I32 optype, OP* first, OP* last);
+PERL_CALLCONV OPclass  Perl_op_class(pTHX_ const OP *o);
 PERL_CALLCONV void     Perl_op_clear(pTHX_ OP* o);
 #define PERL_ARGS_ASSERT_OP_CLEAR      \
        assert(o)
@@ -3074,8 +3076,6 @@ PERL_CALLCONV bool        Perl_sv_does_sv(pTHX_ SV* sv, SV* namesv, U32 flags)
        assert(sv); assert(namesv)
 
 PERL_CALLCONV void     Perl_sv_dump(pTHX_ SV* sv);
-#define PERL_ARGS_ASSERT_SV_DUMP       \
-       assert(sv)
 /* PERL_CALLCONV I32   sv_eq(pTHX_ SV* sv1, SV* sv2); */
 PERL_CALLCONV I32      Perl_sv_eq_flags(pTHX_ SV* sv1, SV* sv2, const U32 flags);
 #ifndef NO_MATHOMS
@@ -3549,7 +3549,9 @@ PERL_CALLCONV UV  Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
 #define PERL_ARGS_ASSERT_UTF8_TO_UVCHR \
        assert(s)
 
-/* PERL_CALLCONV UV    utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen); */
+PERL_CALLCONV UV       Perl_utf8_to_uvchr_buf(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen);
+#define PERL_ARGS_ASSERT_UTF8_TO_UVCHR_BUF     \
+       assert(s); assert(send)
 PERL_CALLCONV UV       Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
                        __attribute__deprecated__;
 #define PERL_ARGS_ASSERT_UTF8_TO_UVUNI \
@@ -3574,7 +3576,7 @@ PERL_CALLCONV void        Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop
        assert(idop)
 /* PERL_CALLCONV U8*   uvchr_to_utf8(pTHX_ U8 *d, UV uv); */
 /* PERL_CALLCONV U8*   uvchr_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags); */
-PERL_CALLCONV U8*      Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags);
+PERL_CALLCONV U8*      Perl_uvoffuni_to_utf8_flags(pTHX_ U8 *d, UV uv, const UV flags);
 #define PERL_ARGS_ASSERT_UVOFFUNI_TO_UTF8_FLAGS        \
        assert(d)
 PERL_CALLCONV U8*      Perl_uvuni_to_utf8(pTHX_ U8 *d, UV uv);
@@ -5041,9 +5043,9 @@ STATIC regnode*   S_regclass(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 dept
 STATIC unsigned int    S_regex_set_precedence(const U8 my_operator)
                        __attribute__warn_unused_result__;
 
-STATIC void    S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *opnd, U32 depth);
+STATIC void    S_reginsert(pTHX_ RExC_state_t *pRExC_state, U8 op, regnode *operand, U32 depth);
 #define PERL_ARGS_ASSERT_REGINSERT     \
-       assert(pRExC_state); assert(opnd)
+       assert(pRExC_state); assert(operand)
 STATIC regnode*        S_regnode_guts(pTHX_ RExC_state_t *pRExC_state, const U8 op, const STRLEN extra_len, const char* const name);
 #define PERL_ARGS_ASSERT_REGNODE_GUTS  \
        assert(pRExC_state); assert(name)
@@ -5355,6 +5357,13 @@ STATIC void      S_to_utf8_substr(pTHX_ regexp * prog);
 #define PERL_ARGS_ASSERT_TO_UTF8_SUBSTR        \
        assert(prog)
 #endif
+#if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C)
+PERL_CALLCONV bool     Perl__is_grapheme(pTHX_ const U8 * strbeg, const U8 * s, const U8 *strend, const UV cp)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT__IS_GRAPHEME  \
+       assert(strbeg); assert(s); assert(strend)
+
+#endif
 #if defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C)
 PERL_CALLCONV bool     Perl_isFOO_lc(pTHX_ const U8 classnum, const U8 character)
                        __attribute__warn_unused_result__;
@@ -5499,7 +5508,7 @@ STATIC char*      S_force_version(pTHX_ char *s, int guessing);
 STATIC char*   S_force_word(pTHX_ char *start, int token, int check_keyword, int allow_pack);
 #define PERL_ARGS_ASSERT_FORCE_WORD    \
        assert(start)
-PERL_STATIC_INLINE SV* S_get_and_check_backslash_N_name(pTHX_ const char* s, const char* const e)
+STATIC SV*     S_get_and_check_backslash_N_name(pTHX_ const char* s, const char* const e)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME        \
        assert(s); assert(e)