This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upstream for Math::BigRat is CPAN
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 535dc78..ea9caba 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -959,6 +959,11 @@ PERL_CALLCONV GP * Perl_newGP(pTHX_ GV *const gv)
 #define PERL_ARGS_ASSERT_NEWGP \
        assert(gv)
 
+PERL_CALLCONV void     Perl_cvgv_set(pTHX_ CV* cv, GV* gv)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_CVGV_SET      \
+       assert(cv)
+
 PERL_CALLCONV void     Perl_gv_init(pTHX_ GV* gv, HV* stash, const char* name, STRLEN len, int multi)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_3);
@@ -1159,6 +1164,7 @@ PERL_CALLCONV void        Perl_init_argv_symbols(pTHX_ int argc, char **argv)
 #define PERL_ARGS_ASSERT_INIT_ARGV_SYMBOLS     \
        assert(argv)
 
+PERL_CALLCONV void     Perl_init_dbargs(pTHX);
 PERL_CALLCONV void     Perl_init_debugger(pTHX);
 PERL_CALLCONV void     Perl_init_stacks(pTHX);
 PERL_CALLCONV void     Perl_init_tm(pTHX_ struct tm *ptm)
@@ -1628,6 +1634,15 @@ PERL_CALLCONV UV Perl_grok_bin(pTHX_ const char* start, STRLEN* len_p, I32* flag
 PERL_CALLCONV char     Perl_grok_bslash_c(pTHX_ const char source, const bool output_warning)
                        __attribute__warn_unused_result__;
 
+PERL_CALLCONV bool     Perl_grok_bslash_o(pTHX_ const char* s, UV* uv, STRLEN* len, const char** error_msg, const bool output_warning)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT_GROK_BSLASH_O \
+       assert(s); assert(uv); assert(len); assert(error_msg)
+
 PERL_CALLCONV UV       Perl_grok_hex(pTHX_ const char* start, STRLEN* len_p, I32* flags, NV *result)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -2557,6 +2572,7 @@ STATIC void       S_pad_reset(pTHX);
 #endif
 PERL_CALLCONV void     Perl_pad_swipe(pTHX_ PADOFFSET po, bool refadjust);
 PERL_CALLCONV void     Perl_peep(pTHX_ OP* o);
+PERL_CALLCONV void     Perl_rpeep(pTHX_ OP* o);
 PERL_CALLCONV PerlIO*  Perl_start_glob(pTHX_ SV *tmpglob, IO *io)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -3475,6 +3491,13 @@ PERL_CALLCONV bool       Perl_sv_cat_decode(pTHX_ SV* dsv, SV *encoding, SV *ssv, int
 #define PERL_ARGS_ASSERT_SV_CAT_DECODE \
        assert(dsv); assert(encoding); assert(ssv); assert(offset); assert(tstr)
 
+PERL_CALLCONV const char*      Perl_sv_reftype_len(pTHX_ const SV *const sv, const int ob, STRLEN *const ret_len)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_SV_REFTYPE_LEN        \
+       assert(sv); assert(ret_len)
+
 PERL_CALLCONV const char*      Perl_sv_reftype(pTHX_ const SV *const sv, const int ob)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -4473,11 +4496,6 @@ STATIC HV*       S_require_tie_mod(pTHX_ GV *gv, const char *varpv, SV* namesv, const
 
 #endif
 
-PERL_CALLCONV void*    Perl_get_arena(pTHX_ const size_t arenasize, const svtype bodytype)
-                       __attribute__malloc__
-                       __attribute__warn_unused_result__;
-
-
 #if defined(PERL_IN_HV_C)
 STATIC void    S_hsplit(pTHX_ HV *hv)
                        __attribute__nonnull__(pTHX_1);
@@ -4489,11 +4507,6 @@ STATIC void      S_hfreeentries(pTHX_ HV *hv)
 #define PERL_ARGS_ASSERT_HFREEENTRIES  \
        assert(hv)
 
-STATIC I32     S_anonymise_cv(pTHX_ HEK *stash, SV *val)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_ANONYMISE_CV  \
-       assert(val)
-
 STATIC HE*     S_new_he(pTHX)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
@@ -5735,7 +5748,7 @@ STATIC SV*        S_save_scalar_at(pTHX_ SV **sptr, const U32 flags)
 
 #endif
 
-#if defined(PERL_IN_GV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_PAD_C)
+#if defined(PERL_IN_GV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_PAD_C) || defined(PERL_IN_OP_C)
 PERL_CALLCONV void     Perl_sv_add_backref(pTHX_ SV *const tsv, SV *const sv)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -5745,14 +5758,19 @@ PERL_CALLCONV void      Perl_sv_add_backref(pTHX_ SV *const tsv, SV *const sv)
 #endif
 
 #if defined(PERL_IN_HV_C) || defined(PERL_IN_MG_C) || defined(PERL_IN_SV_C)
-PERL_CALLCONV int      Perl_sv_kill_backrefs(pTHX_ SV *const sv, AV *const av)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
+PERL_CALLCONV void     Perl_sv_kill_backrefs(pTHX_ SV *const sv, AV *const av)
+                       __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_KILL_BACKREFS      \
-       assert(sv); assert(av)
+       assert(sv)
 
 #endif
 
+PERL_CALLCONV void     Perl_sv_del_backref(pTHX_ SV *const tsv, SV *const sv)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_SV_DEL_BACKREF        \
+       assert(tsv); assert(sv)
+
 #if defined(PERL_IN_SV_C)
 STATIC char *  S_uiv_2buf(char *const buf, const IV iv, UV uv, const int is_uv, char **const peob)
                        __attribute__warn_unused_result__
@@ -5776,12 +5794,6 @@ STATIC I32       S_visit(pTHX_ SVFUNC_t f, const U32 flags, const U32 mask)
 #define PERL_ARGS_ASSERT_VISIT \
        assert(f)
 
-STATIC void    S_sv_del_backref(pTHX_ SV *const tsv, SV *const sv)
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_SV_DEL_BACKREF        \
-       assert(tsv); assert(sv)
-
 STATIC SV *    S_varname(pTHX_ const GV *const gv, const char gvtype, PADOFFSET targ, const SV *const keyname, I32 aindex, int subscript_type)
                        __attribute__warn_unused_result__;
 
@@ -5814,12 +5826,13 @@ STATIC I32      S_expect_number(pTHX_ char **const pattern)
        assert(pattern)
 
 #
-STATIC STRLEN  S_sv_pos_u2b_forwards(const U8 *const start, const U8 *const send, STRLEN *const uoffset)
+STATIC STRLEN  S_sv_pos_u2b_forwards(const U8 *const start, const U8 *const send, STRLEN *const uoffset, bool *const at_end)
                        __attribute__nonnull__(1)
                        __attribute__nonnull__(2)
-                       __attribute__nonnull__(3);
+                       __attribute__nonnull__(3)
+                       __attribute__nonnull__(4);
 #define PERL_ARGS_ASSERT_SV_POS_U2B_FORWARDS   \
-       assert(start); assert(send); assert(uoffset)
+       assert(start); assert(send); assert(uoffset); assert(at_end)
 
 STATIC STRLEN  S_sv_pos_u2b_midway(const U8 *const start, const U8 *send, STRLEN uoffset, const STRLEN uend)
                        __attribute__nonnull__(1)
@@ -5835,6 +5848,12 @@ STATIC STRLEN    S_sv_pos_u2b_cached(pTHX_ SV *const sv, MAGIC **const mgp, const U
 #define PERL_ARGS_ASSERT_SV_POS_U2B_CACHED     \
        assert(sv); assert(mgp); assert(start); assert(send)
 
+STATIC void    S_utf8_mg_len_cache_update(pTHX_ SV *const sv, MAGIC **const mgp, const STRLEN ulen)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_UTF8_MG_LEN_CACHE_UPDATE      \
+       assert(sv); assert(mgp)
+
 STATIC void    S_utf8_mg_pos_cache_update(pTHX_ SV *const sv, MAGIC **const mgp, const STRLEN byte, const STRLEN utf8, const STRLEN blen)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -5848,6 +5867,12 @@ STATIC STRLEN    S_sv_pos_b2u_midway(pTHX_ const U8 *const s, const U8 *const targe
 #define PERL_ARGS_ASSERT_SV_POS_B2U_MIDWAY     \
        assert(s); assert(target); assert(end)
 
+STATIC void    S_assert_uft8_cache_coherent(pTHX_ const char *const func, STRLEN from_cache, STRLEN real, SV *const sv)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_4);
+#define PERL_ARGS_ASSERT_ASSERT_UFT8_CACHE_COHERENT    \
+       assert(func); assert(sv)
+
 STATIC char *  S_F0convert(NV nv, char *const endbuf, STRLEN *const len)
                        __attribute__nonnull__(2)
                        __attribute__nonnull__(3);
@@ -5864,7 +5889,6 @@ STATIC void       S_sv_release_COW(pTHX_ SV *sv, const char *pvx, SV *after)
 
 #  endif
 STATIC SV *    S_more_sv(pTHX);
-STATIC void *  S_more_bodies(pTHX_ const svtype sv_type);
 STATIC bool    S_sv_2iuv_common(pTHX_ SV *const sv)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SV_2IUV_COMMON        \
@@ -5888,8 +5912,16 @@ STATIC PTR_TBL_ENT_t *   S_ptr_table_find(PTR_TBL_t *const tbl, const void *const
 #define PERL_ARGS_ASSERT_PTR_TABLE_FIND        \
        assert(tbl)
 
+STATIC void    S_anonymise_cv_maybe(pTHX_ GV *gv, CV *cv)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_ANONYMISE_CV_MAYBE    \
+       assert(gv); assert(cv)
+
 #endif
 
+PERL_CALLCONV void *   Perl_more_bodies(pTHX_ const svtype sv_type, const size_t body_size, const size_t arena_size);
+
 #if defined(PERL_IN_TOKE_C)
 STATIC void    S_check_uni(pTHX);
 STATIC void    S_force_next(pTHX_ I32 type);
@@ -6915,11 +6947,16 @@ PERL_CALLCONV void      Perl_sys_init3(int* argc, char*** argv, char*** env)
        assert(argc); assert(argv); assert(env)
 
 PERL_CALLCONV void     Perl_sys_term(void);
-PERL_CALLCONV const char *     Perl_fetch_cop_label(pTHX_ struct refcounted_he *const chain, STRLEN *len, U32 *flags);
-PERL_CALLCONV struct refcounted_he *   Perl_store_cop_label(pTHX_ struct refcounted_he *const chain, const char *label)
+PERL_CALLCONV const char *     Perl_fetch_cop_label(pTHX_ COP *const cop, STRLEN *len, U32 *flags)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_FETCH_COP_LABEL       \
+       assert(cop)
+
+PERL_CALLCONV void     Perl_store_cop_label(pTHX_ COP *cop, const char *label, STRLEN len, U32 flags)
+                       __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_STORE_COP_LABEL       \
-       assert(label)
+       assert(cop); assert(label)
 
 
 PERL_CALLCONV int      Perl_keyword_plugin_standard(pTHX_ char* keyword_ptr, STRLEN keyword_len, OP** op_ptr)