This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldelta for vstrings and set-magic
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index 806b56c..63d1c9c 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -2280,7 +2280,7 @@ PERL_CALLCONV int Perl_magic_killbackrefs(pTHX_ SV *sv, MAGIC *mg)
 #define PERL_ARGS_ASSERT_MAGIC_KILLBACKREFS    \
        assert(sv); assert(mg)
 
-PERL_CALLCONV SV*      Perl_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, const char *meth, U32 flags, U32 argc, ...)
+PERL_CALLCONV SV*      Perl_magic_methcall(pTHX_ SV *sv, const MAGIC *mg, SV *meth, U32 flags, U32 argc, ...)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -3252,12 +3252,13 @@ PERL_CALLCONV REGEXP*   Perl_re_compile(pTHX_ SV * const pattern, U32 orig_rx_flag
 #define PERL_ARGS_ASSERT_RE_COMPILE    \
        assert(pattern)
 
-PERL_CALLCONV char*    Perl_re_intuit_start(pTHX_ REGEXP * const rx, SV* sv, char* strpos, char* strend, const U32 flags, re_scream_pos_data *data)
+PERL_CALLCONV char*    Perl_re_intuit_start(pTHX_ REGEXP * const rx, SV* sv, const char* const strbeg, char* strpos, char* strend, const U32 flags, re_scream_pos_data *data)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_3)
-                       __attribute__nonnull__(pTHX_4);
+                       __attribute__nonnull__(pTHX_4)
+                       __attribute__nonnull__(pTHX_5);
 #define PERL_ARGS_ASSERT_RE_INTUIT_START       \
-       assert(rx); assert(strpos); assert(strend)
+       assert(rx); assert(strbeg); assert(strpos); assert(strend)
 
 PERL_CALLCONV SV*      Perl_re_intuit_string(pTHX_ REGEXP  *const r)
                        __attribute__nonnull__(pTHX_1);
@@ -4542,7 +4543,7 @@ PERL_CALLCONV void        Perl_taint_proper(pTHX_ const char* f, const char *const s)
 #define PERL_ARGS_ASSERT_TAINT_PROPER  \
        assert(s)
 
-PERL_CALLCONV OP *     Perl_tied_method(pTHX_ const char *const methname, SV **sp, SV *const sv, const MAGIC *const mg, const U32 flags, U32 argc, ...)
+PERL_CALLCONV OP *     Perl_tied_method(pTHX_ SV *methname, SV **sp, SV *const sv, const MAGIC *const mg, const U32 flags, U32 argc, ...)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3)
@@ -4737,6 +4738,11 @@ PERL_CALLCONV UV Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
 #define PERL_ARGS_ASSERT_VALID_UTF8_TO_UVUNI   \
        assert(s)
 
+PERL_CALLCONV bool     Perl_validate_proto(pTHX_ SV *name, SV *proto, bool warn)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_VALIDATE_PROTO        \
+       assert(name)
+
 PERL_CALLCONV int      Perl_vcmp(pTHX_ SV *lhv, SV *rhv)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -5187,6 +5193,7 @@ STATIC void       S_put_byte(pTHX_ SV* sv, int c)
        assert(sv)
 
 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_ struct RExC_state_t *pRExC_state, regnode *p, const regnode *val, U32 depth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
@@ -5723,7 +5730,7 @@ STATIC HE*        S_new_he(pTHX)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
-STATIC U32     S_ptr_hash(PTRV u);
+PERL_STATIC_INLINE U32 S_ptr_hash(PTRV u);
 STATIC SV *    S_refcounted_he_value(pTHX_ const struct refcounted_he *he)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_REFCOUNTED_HE_VALUE   \
@@ -5761,6 +5768,7 @@ PERL_CALLCONV SV* Perl_hfree_next_entry(pTHX_ HV *hv, STRLEN *indexp)
 #endif
 #if defined(PERL_IN_LOCALE_C)
 #  if defined(USE_LOCALE_NUMERIC) || defined(USE_LOCALE_COLLATE)
+STATIC bool    S_is_cur_LC_category_utf8(pTHX_ int category);
 STATIC char*   S_stdize_locale(pTHX_ char* locs)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_STDIZE_LOCALE \
@@ -5769,14 +5777,14 @@ STATIC char*    S_stdize_locale(pTHX_ char* locs)
 #  endif
 #endif
 #if defined(PERL_IN_MG_C)
-STATIC SV*     S_magic_methcall1(pTHX_ SV *sv, const MAGIC *mg, const char *meth, U32 flags, int n, SV *val)
+STATIC SV*     S_magic_methcall1(pTHX_ SV *sv, const MAGIC *mg, SV *meth, U32 flags, int n, SV *val)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT_MAGIC_METHCALL1       \
        assert(sv); assert(mg); assert(meth)
 
-STATIC int     S_magic_methpack(pTHX_ SV *sv, const MAGIC *mg, const char *meth)
+STATIC int     S_magic_methpack(pTHX_ SV *sv, const MAGIC *mg, SV *meth)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -5784,9 +5792,9 @@ STATIC int        S_magic_methpack(pTHX_ SV *sv, const MAGIC *mg, const char *meth)
        assert(sv); assert(mg); assert(meth)
 
 STATIC void    S_restore_magic(pTHX_ const void *p);
-STATIC void    S_save_magic(pTHX_ I32 mgs_ix, SV *sv)
+STATIC void    S_save_magic_flags(pTHX_ I32 mgs_ix, SV *sv, U32 flags)
                        __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_SAVE_MAGIC    \
+#define PERL_ARGS_ASSERT_SAVE_MAGIC_FLAGS      \
        assert(sv)
 
 STATIC void    S_unwind_handler_stack(pTHX_ const void *p);
@@ -5837,19 +5845,19 @@ STATIC void     S_apply_attrs_my(pTHX_ HV *stash, OP *target, OP *attrs, OP **imopsp
 #define PERL_ARGS_ASSERT_APPLY_ATTRS_MY        \
        assert(stash); assert(target); assert(imopsp)
 
-STATIC void    S_bad_type_pv(pTHX_ I32 n, const char *t, const char *name, U32 flags, const OP *kid)
+STATIC void    S_bad_type_gv(pTHX_ I32 n, const char *t, GV *gv, U32 flags, const OP *kid)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3)
                        __attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_BAD_TYPE_PV   \
-       assert(t); assert(name); assert(kid)
+#define PERL_ARGS_ASSERT_BAD_TYPE_GV   \
+       assert(t); assert(gv); assert(kid)
 
-STATIC void    S_bad_type_sv(pTHX_ I32 n, const char *t, SV *namesv, U32 flags, const OP *kid)
+STATIC void    S_bad_type_pv(pTHX_ I32 n, const char *t, const char *name, U32 flags, const OP *kid)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3)
                        __attribute__nonnull__(pTHX_5);
-#define PERL_ARGS_ASSERT_BAD_TYPE_SV   \
-       assert(t); assert(namesv); assert(kid)
+#define PERL_ARGS_ASSERT_BAD_TYPE_PV   \
+       assert(t); assert(name); assert(kid)
 
 STATIC void    S_cop_free(pTHX_ COP *cop)
                        __attribute__nonnull__(pTHX_1);
@@ -6201,10 +6209,10 @@ STATIC bool     S_matcher_matches_sv(pTHX_ PMOP* matcher, SV* sv)
 STATIC bool    S_num_overflow(NV value, I32 fldsize, I32 frcsize)
                        __attribute__warn_unused_result__;
 
-STATIC bool    S_path_is_absolute(const char *name)
+PERL_STATIC_INLINE bool        S_path_is_searchable(const char *name)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(1);
-#define PERL_ARGS_ASSERT_PATH_IS_ABSOLUTE      \
+#define PERL_ARGS_ASSERT_PATH_IS_SEARCHABLE    \
        assert(name)
 
 STATIC I32     S_run_user_filter(pTHX_ int idx, SV *buf_sv, int maxlen)
@@ -7215,7 +7223,7 @@ STATIC char*      S_force_version(pTHX_ char *s, int guessing)
 #define PERL_ARGS_ASSERT_FORCE_VERSION \
        assert(s)
 
-STATIC char*   S_force_word(pTHX_ char *start, int token, int check_keyword, int allow_pack, int allow_tick)
+STATIC char*   S_force_word(pTHX_ char *start, int token, int check_keyword, int allow_pack)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_FORCE_WORD    \
        assert(start)