This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
s/safefree()/Safefree() in a few places
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 500c581..63f53cd 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -972,6 +972,11 @@ PERL_CALLCONV char*        Perl_form(pTHX_ const char* pat, ...)
 
 PERL_CALLCONV void     Perl_free_tied_hv_pool(pTHX);
 PERL_CALLCONV void     Perl_free_tmps(pTHX);
+PERL_CALLCONV SV*      Perl_get_and_check_backslash_N_name(pTHX_ const char* s, const char* const e, const bool is_utf8, const char** error_msg)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME        \
+       assert(s); assert(e); assert(error_msg)
+
 PERL_CALLCONV AV*      Perl_get_av(pTHX_ const char *name, I32 flags);
 #define PERL_ARGS_ASSERT_GET_AV        \
        assert(name)
@@ -3103,12 +3108,20 @@ PERL_CALLCONV char*     Perl_scan_num(pTHX_ const char* s, YYSTYPE *lvalp);
 PERL_CALLCONV NV       Perl_scan_oct(pTHX_ const char* start, STRLEN len, STRLEN* retlen);
 #define PERL_ARGS_ASSERT_SCAN_OCT      \
        assert(start); assert(retlen)
+PERL_CALLCONV char*    Perl_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims, int re_reparse, char **delimp)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_SCAN_STR      \
+       assert(start)
+
 PERL_CALLCONV const char*      Perl_scan_version(pTHX_ const char *s, SV *rv, bool qv);
 #define PERL_ARGS_ASSERT_SCAN_VERSION  \
        assert(s); assert(rv)
 PERL_CALLCONV char*    Perl_scan_vstring(pTHX_ const char *s, const char *const e, SV *sv);
 #define PERL_ARGS_ASSERT_SCAN_VSTRING  \
        assert(s); assert(e); assert(sv)
+PERL_CALLCONV char*    Perl_scan_word(pTHX_ char *s, char *dest, STRLEN destlen, int allow_package, STRLEN *slp);
+#define PERL_ARGS_ASSERT_SCAN_WORD     \
+       assert(s); assert(dest); assert(slp)
 PERL_CALLCONV U32      Perl_seed(pTHX);
 PERL_CALLCONV void     Perl_set_caret_X(pTHX);
 PERL_CALLCONV void     Perl_set_context(void *t);
@@ -3127,6 +3140,11 @@ PERL_CALLCONV void       Perl_setfd_inhexec_for_sysfd(pTHX_ int fd);
 PERL_CALLCONV HEK*     Perl_share_hek(pTHX_ const char* str, SSize_t len, U32 hash);
 #define PERL_ARGS_ASSERT_SHARE_HEK     \
        assert(str)
+PERL_CALLCONV char*    Perl_skipspace_flags(pTHX_ char *s, U32 flags)
+                       __attribute__warn_unused_result__;
+#define PERL_ARGS_ASSERT_SKIPSPACE_FLAGS       \
+       assert(s)
+
 PERL_CALLCONV void     Perl_sortsv(pTHX_ SV** array, size_t num_elts, SVCOMPARE_t cmp);
 #define PERL_ARGS_ASSERT_SORTSV        \
        assert(cmp)
@@ -4429,7 +4447,7 @@ PERL_CALLCONV int Perl_re_indentf(pTHX_ const char *fmt, U32 depth, ...);
        assert(fmt)
 STATIC void    S_regdump_extflags(pTHX_ const char *lead, const U32 flags);
 STATIC void    S_regdump_intflags(pTHX_ const char *lead, const U32 flags);
-STATIC U8      S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode_offset p, const regnode_offset val, U32 depth);
+STATIC bool    S_regtail_study(pTHX_ RExC_state_t *pRExC_state, regnode_offset p, const regnode_offset val, U32 depth);
 #define PERL_ARGS_ASSERT_REGTAIL_STUDY \
        assert(pRExC_state); assert(p); assert(val)
 #  endif
@@ -5452,7 +5470,7 @@ STATIC int        S_handle_possible_posix(pTHX_ RExC_state_t *pRExC_state, const char*
 STATIC regnode_offset  S_handle_regex_sets(pTHX_ RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse);
 #define PERL_ARGS_ASSERT_HANDLE_REGEX_SETS     \
        assert(pRExC_state); assert(flagp); assert(oregcomp_parse)
-PERL_CALLCONV SV *     Perl_handle_user_defined_property(pTHX_ const char * name, const STRLEN name_len, const bool is_utf8, const bool to_fold, const bool runtime, SV* contents, bool *user_defined_ptr, SV * msg, const STRLEN level);
+PERL_CALLCONV SV *     Perl_handle_user_defined_property(pTHX_ const char * name, const STRLEN name_len, const bool is_utf8, const bool to_fold, const bool runtime, const bool deferrable, SV* contents, bool *user_defined_ptr, SV * msg, const STRLEN level);
 #define PERL_ARGS_ASSERT_HANDLE_USER_DEFINED_PROPERTY  \
        assert(name); assert(contents); assert(user_defined_ptr); assert(msg)
 STATIC SV*     S_invlist_contents(pTHX_ SV* const invlist, const bool traditional_style)
@@ -5512,7 +5530,7 @@ STATIC void       S_output_posix_warnings(pTHX_ RExC_state_t *pRExC_state, AV* posix_w
 STATIC void    S_parse_lparen_question_flags(pTHX_ RExC_state_t *pRExC_state);
 #define PERL_ARGS_ASSERT_PARSE_LPAREN_QUESTION_FLAGS   \
        assert(pRExC_state)
-PERL_CALLCONV SV *     Perl_parse_uniprop_string(pTHX_ const char * const name, const Size_t name_len, const bool is_utf8, const bool to_fold, const bool runtime, bool * user_defined_ptr, SV * msg, const STRLEN level);
+PERL_CALLCONV SV *     Perl_parse_uniprop_string(pTHX_ const char * const name, const Size_t name_len, const bool is_utf8, const bool to_fold, const bool runtime, const bool deferrable, bool * user_defined_ptr, SV * msg, const STRLEN level);
 #define PERL_ARGS_ASSERT_PARSE_UNIPROP_STRING  \
        assert(name); assert(user_defined_ptr); assert(msg)
 STATIC void    S_populate_ANYOF_from_invlist(pTHX_ regnode *node, SV** invlist_ptr);
@@ -5564,7 +5582,7 @@ STATIC regnode_offset     S_regnode_guts(pTHX_ RExC_state_t *pRExC_state, const U8 o
 STATIC regnode_offset  S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth);
 #define PERL_ARGS_ASSERT_REGPIECE      \
        assert(pRExC_state); assert(flagp)
-STATIC void    S_regtail(pTHX_ RExC_state_t * pRExC_state, const regnode_offset p, const regnode_offset val, const U32 depth);
+STATIC bool    S_regtail(pTHX_ RExC_state_t * pRExC_state, const regnode_offset p, const regnode_offset val, const U32 depth);
 #define PERL_ARGS_ASSERT_REGTAIL       \
        assert(pRExC_state); assert(p); assert(val)
 STATIC void    S_scan_commit(pTHX_ const RExC_state_t *pRExC_state, struct scan_data_t *data, SSize_t *minlenp, int is_inf);
@@ -5696,8 +5714,6 @@ PERL_STATIC_INLINE UV*    S_invlist_array(SV* const invlist)
 #ifndef PERL_NO_INLINE_FUNCTIONS
 PERL_STATIC_INLINE bool        S_is_invlist(SV* const invlist)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_IS_INVLIST    \
-       assert(invlist)
 #endif
 
 #endif
@@ -5885,10 +5901,10 @@ STATIC SSize_t  S_regmatch(pTHX_ regmatch_info *reginfo, char *startpos, regnode
 #define PERL_ARGS_ASSERT_REGMATCH      \
        assert(reginfo); assert(startpos); assert(prog)
 
-STATIC I32     S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, regmatch_info *const reginfo, I32 max _pDEPTH)
+STATIC I32     S_regrepeat(pTHX_ regexp *prog, char **startposp, const regnode *p, char *loceol, regmatch_info *const reginfo, I32 max _pDEPTH)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_REGREPEAT     \
-       assert(prog); assert(startposp); assert(p); assert(reginfo)
+       assert(prog); assert(startposp); assert(p); assert(loceol); assert(reginfo)
 
 STATIC bool    S_regtry(pTHX_ regmatch_info *reginfo, char **startposp)
                        __attribute__warn_unused_result__;
@@ -6056,9 +6072,9 @@ 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)
-STATIC 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_wrapper(pTHX_ const char* s, const char* const e)
                        __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME        \
+#define PERL_ARGS_ASSERT_GET_AND_CHECK_BACKSLASH_N_NAME_WRAPPER        \
        assert(s); assert(e)
 
 STATIC void    S_incline(pTHX_ const char *s, const char *end);
@@ -6076,7 +6092,7 @@ STATIC I32        S_lop(pTHX_ I32 f, U8 x, char *s);
 PERL_STATIC_NO_RET void        S_missingterm(pTHX_ char *s, STRLEN len)
                        __attribute__noreturn__;
 
-STATIC SV*     S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen, SV *sv, SV *pv, const char *type, STRLEN typelen);
+STATIC SV*     S_new_constant(pTHX_ const char *s, STRLEN len, const char *key, STRLEN keylen, SV *sv, SV *pv, const char *type, STRLEN typelen, const char ** error_msg);
 #define PERL_ARGS_ASSERT_NEW_CONSTANT  \
        assert(key); assert(sv)
 STATIC void    S_no_op(pTHX_ const char *const what, char *s);
@@ -6114,11 +6130,6 @@ STATIC char*     S_scan_pat(pTHX_ char *start, I32 type)
 #define PERL_ARGS_ASSERT_SCAN_PAT      \
        assert(start)
 
-STATIC char*   S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims, int re_reparse, char **delimp)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_SCAN_STR      \
-       assert(start)
-
 STATIC char*   S_scan_subst(pTHX_ char *start)
                        __attribute__warn_unused_result__;
 #define PERL_ARGS_ASSERT_SCAN_SUBST    \
@@ -6129,14 +6140,6 @@ STATIC char*     S_scan_trans(pTHX_ char *start)
 #define PERL_ARGS_ASSERT_SCAN_TRANS    \
        assert(start)
 
-STATIC char*   S_scan_word(pTHX_ char *s, char *dest, STRLEN destlen, int allow_package, STRLEN *slp);
-#define PERL_ARGS_ASSERT_SCAN_WORD     \
-       assert(s); assert(dest); assert(slp)
-STATIC char*   S_skipspace_flags(pTHX_ char *s, U32 flags)
-                       __attribute__warn_unused_result__;
-#define PERL_ARGS_ASSERT_SKIPSPACE_FLAGS       \
-       assert(s)
-
 STATIC I32     S_sublex_done(pTHX)
                        __attribute__warn_unused_result__;