This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Remove the vestigial my_safe{calloc,malloc,free} macros from sv.c
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 6fc11dd..39b88c5 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)
@@ -2556,7 +2571,11 @@ PERL_CALLCONV void       Perl_pad_free(pTHX_ PADOFFSET po);
 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_peep(pTHX_ OP* o, peep_next_t *next_peep)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_PEEP  \
+       assert(next_peep)
+
 PERL_CALLCONV PerlIO*  Perl_start_glob(pTHX_ SV *tmpglob, IO *io)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -4489,11 +4508,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 +5749,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 +5759,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 +5795,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 +5827,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)
@@ -5854,6 +5868,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);
@@ -5894,6 +5914,12 @@ 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
 
 #if defined(PERL_IN_TOKE_C)