This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Eliminate my_{hto[bl]e,[bl]etoh}{16,32,64,s,i,l} as nothing now uses them.
[perl5.git] / proto.h
diff --git a/proto.h b/proto.h
index b4d81d6..5bf4d39 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -23,6 +23,9 @@ PERL_CALLCONV int     Perl_Gv_AMupdate(pTHX_ HV* stash, bool destructing)
        assert(stash)
 
 PERL_CALLCONV const char *     Perl_PerlIO_context_layers(pTHX_ const char *mode);
+PERL_CALLCONV_NO_RET void      Perl_croak_memory_wrap(void)
+                       __attribute__noreturn__;
+
 PERL_CALLCONV void*    Perl_Slab_Alloc(pTHX_ size_t sz)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
@@ -227,6 +230,16 @@ PERL_CALLCONV SV** Perl_av_store(pTHX_ AV *av, I32 key, SV *val)
 #define PERL_ARGS_ASSERT_AV_STORE      \
        assert(av)
 
+/* PERL_CALLCONV I32   Perl_av_tindex(pTHX_ AV *av)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1); */
+
+PERL_STATIC_INLINE I32 S_av_top_index(pTHX_ AV *av)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_AV_TOP_INDEX  \
+       assert(av)
+
 PERL_CALLCONV void     Perl_av_undef(pTHX_ AV *av)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_AV_UNDEF      \
@@ -657,7 +670,7 @@ PERL_CALLCONV SV *  Perl_core_prototype(pTHX_ SV *sv, const char *name, const int
 #define PERL_ARGS_ASSERT_CORE_PROTOTYPE        \
        assert(name)
 
-PERL_CALLCONV OP *     Perl_coresub_op(pTHX_ SV *coreargssv, const int code, const int opnum)
+PERL_CALLCONV OP *     Perl_coresub_op(pTHX_ SV *const coreargssv, const int code, const int opnum)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_CORESUB_OP    \
        assert(coreargssv)
@@ -667,9 +680,6 @@ PERL_CALLCONV_NO_RET void   Perl_croak(pTHX_ const char* pat, ...)
                        __attribute__noreturn__
                        __attribute__format__null_ok__(__printf__,pTHX_1,pTHX_2);
 
-PERL_STATIC_NO_RET void        S_croak_memory_wrap(void)
-                       __attribute__noreturn__;
-
 PERL_CALLCONV_NO_RET void      Perl_croak_no_mem(void)
                        __attribute__noreturn__;
 
@@ -1159,7 +1169,7 @@ PERL_CALLCONV void        Perl_get_db_sub(pTHX_ SV **svp, CV *cv)
 #define PERL_ARGS_ASSERT_GET_DB_SUB    \
        assert(cv)
 
-PERL_CALLCONV void     Perl_get_hash_seed(pTHX_ unsigned char *seed_buffer)
+PERL_CALLCONV void     Perl_get_hash_seed(pTHX_ unsigned char * const seed_buffer)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_GET_HASH_SEED \
        assert(seed_buffer)
@@ -1543,7 +1553,7 @@ PERL_CALLCONV STRLEN      Perl_hv_fill(pTHX_ HV const *const hv)
 #define PERL_ARGS_ASSERT_HV_FILL       \
        assert(hv)
 
-PERL_CALLCONV void     Perl_hv_free_ent(pTHX_ HV *hv, HE *entryK)
+PERL_CALLCONV void     Perl_hv_free_ent(pTHX_ HV *hv, HE *entry)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_HV_FREE_ENT   \
        assert(hv)
@@ -1625,6 +1635,11 @@ PERL_CALLCONV void       Perl_hv_placeholders_set(pTHX_ HV *hv, I32 ph)
 #define PERL_ARGS_ASSERT_HV_PLACEHOLDERS_SET   \
        assert(hv)
 
+PERL_CALLCONV void     Perl_hv_rand_set(pTHX_ HV *hv, U32 new_xhv_rand)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_HV_RAND_SET   \
+       assert(hv)
+
 PERL_CALLCONV I32*     Perl_hv_riter_p(pTHX_ HV *hv)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -2290,13 +2305,6 @@ PERL_CALLCONV int        Perl_magic_regdatum_get(pTHX_ SV* sv, MAGIC* mg)
 #define PERL_ARGS_ASSERT_MAGIC_REGDATUM_GET    \
        assert(sv); assert(mg)
 
-PERL_CALLCONV_NO_RET int       Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
-                       __attribute__noreturn__
-                       __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2);
-#define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET    \
-       assert(sv); assert(mg)
-
 PERL_CALLCONV SV*      Perl_magic_scalarpack(pTHX_ HV *hv, MAGIC *mg)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_2);
@@ -3260,7 +3268,7 @@ PERL_CALLCONV SV* Perl_re_intuit_string(pTHX_ REGEXP  *const r)
 #define PERL_ARGS_ASSERT_RE_INTUIT_STRING      \
        assert(r)
 
-PERL_CALLCONV REGEXP*  Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, OP *expr, const regexp_engine* eng, REGEXP *VOL old_re, bool *is_bare_re, U32 rx_flags, U32 pm_flags)
+PERL_CALLCONV REGEXP*  Perl_re_op_compile(pTHX_ SV ** const patternp, int pat_count, OP *expr, const regexp_engine* eng, REGEXP *old_re, bool *is_bare_re, U32 rx_flags, U32 pm_flags)
                        __attribute__nonnull__(pTHX_4);
 #define PERL_ARGS_ASSERT_RE_OP_COMPILE \
        assert(eng)
@@ -4962,6 +4970,15 @@ PERL_CALLCONV void       Perl_utilize(pTHX_ int aver, I32 floor, OP* version, OP* idop
        assert(idop)
 
 #endif
+#if !(defined(_MSC_VER))
+PERL_CALLCONV_NO_RET int       Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__noreturn__
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET    \
+       assert(sv); assert(mg)
+
+#endif
 #if !defined(HAS_BZERO) && !defined(HAS_MEMSET)
 PERL_CALLCONV char*    Perl_my_bzero(char* loc, I32 len)
                        __attribute__nonnull__(1);
@@ -5328,20 +5345,6 @@ PERL_CALLCONV MEM_SIZE   Perl_malloced_size(void *p)
        assert(p)
 
 #endif
-#if defined(MYSWAP)
-PERL_CALLCONV long     Perl_my_htonl(pTHX_ long l)
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
-
-PERL_CALLCONV long     Perl_my_ntohl(pTHX_ long l)
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
-
-PERL_CALLCONV short    Perl_my_swap(pTHX_ short s)
-                       __attribute__warn_unused_result__
-                       __attribute__pure__;
-
-#endif
 #if defined(NO_MATHOMS)
 /* PERL_CALLCONV void  Perl_sv_nounlocking(pTHX_ SV *sv); */
 #endif
@@ -5689,21 +5692,22 @@ STATIC void     S_hfreeentries(pTHX_ HV *hv)
 #define PERL_ARGS_ASSERT_HFREEENTRIES  \
        assert(hv)
 
-STATIC void    S_hsplit(pTHX_ HV *hv)
+STATIC void    S_hsplit(pTHX_ HV *hv, STRLEN const oldsize, STRLEN newsize)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_HSPLIT        \
        assert(hv)
 
-STATIC struct xpvhv_aux*       S_hv_auxinit(HV *hv)
-                       __attribute__nonnull__(1);
+STATIC struct xpvhv_aux*       S_hv_auxinit(pTHX_ HV *hv)
+                       __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_HV_AUXINIT    \
        assert(hv)
 
 STATIC SV*     S_hv_delete_common(pTHX_ HV *hv, SV *keysv, const char *key, STRLEN klen, int k_flags, I32 d_flags, U32 hash);
-STATIC SV*     S_hv_free_ent_ret(pTHX_ HV *hv, HE *entryK)
-                       __attribute__nonnull__(pTHX_1);
+STATIC SV*     S_hv_free_ent_ret(pTHX_ HV *hv, HE *entry)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
 #define PERL_ARGS_ASSERT_HV_FREE_ENT_RET       \
-       assert(hv)
+       assert(hv); assert(entry)
 
 STATIC void    S_hv_magic_check(HV *hv, bool *needs_copy, bool *needs_store)
                        __attribute__nonnull__(1)
@@ -5723,6 +5727,7 @@ STATIC HE*        S_new_he(pTHX)
                        __attribute__malloc__
                        __attribute__warn_unused_result__;
 
+STATIC 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   \
@@ -6472,9 +6477,9 @@ PERL_STATIC_INLINE U8     S_compute_EXACTish(pTHX_ struct RExC_state_t *pRExC_state)
 #define PERL_ARGS_ASSERT_COMPUTE_EXACTISH      \
        assert(pRExC_state)
 
-STATIC bool    S_could_it_be_POSIX(pTHX_ struct RExC_state_t *pRExC_state)
+STATIC bool    S_could_it_be_a_POSIX_class(pTHX_ struct RExC_state_t *pRExC_state)
                        __attribute__nonnull__(pTHX_1);
-#define PERL_ARGS_ASSERT_COULD_IT_BE_POSIX     \
+#define PERL_ARGS_ASSERT_COULD_IT_BE_A_POSIX_CLASS     \
        assert(pRExC_state)
 
 PERL_STATIC_INLINE UV* S_get_invlist_iter_addr(pTHX_ SV* invlist)
@@ -6501,17 +6506,17 @@ PERL_STATIC_INLINE UV*  S_get_invlist_zero_addr(pTHX_ SV* invlist)
 #define PERL_ARGS_ASSERT_GET_INVLIST_ZERO_ADDR \
        assert(invlist)
 
-STATIC bool    S_grok_bslash_N(pTHX_ struct RExC_state_t *pRExC_state, regnode** nodep, UV *valuep, I32 *flagp, U32 depth, bool in_char_class)
+STATIC bool    S_grok_bslash_N(pTHX_ struct RExC_state_t *pRExC_state, regnode** nodep, UV *valuep, I32 *flagp, U32 depth, bool in_char_class, const bool strict)
                        __attribute__nonnull__(pTHX_1)
                        __attribute__nonnull__(pTHX_4);
 #define PERL_ARGS_ASSERT_GROK_BSLASH_N \
        assert(pRExC_state); assert(flagp)
 
-STATIC regnode*        S_handle_sets(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U32 depth, char * const oregcomp_parse)
+STATIC regnode*        S_handle_regex_sets(pTHX_ struct RExC_state_t *pRExC_state, SV ** return_invlist, I32 *flagp, U32 depth, char * const oregcomp_parse)
                        __attribute__nonnull__(pTHX_1)
-                       __attribute__nonnull__(pTHX_2)
-                       __attribute__nonnull__(pTHX_4);
-#define PERL_ARGS_ASSERT_HANDLE_SETS   \
+                       __attribute__nonnull__(pTHX_3)
+                       __attribute__nonnull__(pTHX_5);
+#define PERL_ARGS_ASSERT_HANDLE_REGEX_SETS     \
        assert(pRExC_state); assert(flagp); assert(oregcomp_parse)
 
 PERL_STATIC_INLINE UV* S_invlist_array(pTHX_ SV* const invlist)
@@ -6617,6 +6622,11 @@ STATIC char *    S_nextchar(pTHX_ struct RExC_state_t *pRExC_state)
 #define PERL_ARGS_ASSERT_NEXTCHAR      \
        assert(pRExC_state)
 
+STATIC void    S_parse_lparen_question_flags(pTHX_ struct RExC_state_t *pRExC_state)
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_PARSE_LPAREN_QUESTION_FLAGS   \
+       assert(pRExC_state)
+
 PERL_STATIC_NO_RET void        S_re_croak2(pTHX_ const char* pat1, const char* pat2, ...)
                        __attribute__noreturn__
                        __attribute__nonnull__(pTHX_1)
@@ -6692,7 +6702,7 @@ STATIC regnode*   S_regpiece(pTHX_ struct RExC_state_t *pRExC_state, I32 *flagp, U
 #define PERL_ARGS_ASSERT_REGPIECE      \
        assert(pRExC_state); assert(flagp)
 
-PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ struct RExC_state_t *pRExC_state, I32 value, SV *free_me, const bool strict)
+PERL_STATIC_INLINE I32 S_regpposixcc(pTHX_ struct RExC_state_t *pRExC_state, I32 value, const bool strict)
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_REGPPOSIXCC   \
        assert(pRExC_state)
@@ -6788,6 +6798,13 @@ PERL_CALLCONV SV*        Perl__core_swash_init(pTHX_ const char* pkg, const char* name,
 
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
+STATIC char*   S_form_short_octal_warning(pTHX_ const char * const s, const STRLEN len)
+                       __attribute__warn_unused_result__
+                       __attribute__pure__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT_FORM_SHORT_OCTAL_WARNING      \
+       assert(s)
+
 STATIC char    S_grok_bslash_c(pTHX_ const char source, const bool utf8, const bool output_warning)
                        __attribute__warn_unused_result__;
 
@@ -6807,7 +6824,7 @@ PERL_STATIC_INLINE bool   S_grok_bslash_x(pTHX_ char** s, UV* uv, const char** err
 #define PERL_ARGS_ASSERT_GROK_BSLASH_X \
        assert(s); assert(uv); assert(error_msg)
 
-PERL_STATIC_INLINE I32 S_regcurly(pTHX_ const char *s)
+PERL_STATIC_INLINE I32 S_regcurly(pTHX_ const char *s, const bool rbrace_must_be_escaped)
                        __attribute__warn_unused_result__
                        __attribute__pure__
                        __attribute__nonnull__(pTHX_1);
@@ -7247,6 +7264,13 @@ STATIC void      S_no_op(pTHX_ const char *const what, char *s)
 #define PERL_ARGS_ASSERT_NO_OP \
        assert(what)
 
+STATIC void    S_parse_ident(pTHX_ char **s, char **d, char * const e, int allow_package, bool is_utf8)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2)
+                       __attribute__nonnull__(pTHX_3);
+#define PERL_ARGS_ASSERT_PARSE_IDENT   \
+       assert(s); assert(d); assert(e)
+
 STATIC int     S_pending_ident(pTHX);
 STATIC void    S_readpipe_override(pTHX);
 STATIC char*   S_scan_const(pTHX_ char *start)
@@ -7286,7 +7310,7 @@ 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)
+STATIC char*   S_scan_str(pTHX_ char *start, int keep_quoted, int keep_delims, int re_reparse, bool deprecate_escaped_matching)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
 #define PERL_ARGS_ASSERT_SCAN_STR      \
@@ -7419,7 +7443,7 @@ PERL_CALLCONV UV  Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *le
 
 #endif
 #if defined(PERL_IN_UTF8_C) || defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
-PERL_CALLCONV UV       Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const bool flags)
+PERL_CALLCONV UV       Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const unsigned int flags)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
 #define PERL_ARGS_ASSERT__TO_FOLD_LATIN1       \
@@ -7573,78 +7597,6 @@ PERL_CALLCONV void       Perl_xmldump_vindent(pTHX_ I32 level, PerlIO *file, const cha
        assert(file); assert(pat)
 
 #endif
-#if defined(PERL_NEED_MY_BETOH16)
-PERL_CALLCONV U16      Perl_my_betoh16(U16 n);
-#endif
-#if defined(PERL_NEED_MY_BETOH32)
-PERL_CALLCONV U32      Perl_my_betoh32(U32 n);
-#endif
-#if defined(PERL_NEED_MY_BETOH64)
-PERL_CALLCONV U64      Perl_my_betoh64(U64 n);
-#endif
-#if defined(PERL_NEED_MY_BETOHI)
-PERL_CALLCONV int      Perl_my_betohi(int n);
-#endif
-#if defined(PERL_NEED_MY_BETOHL)
-PERL_CALLCONV long     Perl_my_betohl(long n);
-#endif
-#if defined(PERL_NEED_MY_BETOHS)
-PERL_CALLCONV short    Perl_my_betohs(short n);
-#endif
-#if defined(PERL_NEED_MY_HTOBE16)
-PERL_CALLCONV U16      Perl_my_htobe16(U16 n);
-#endif
-#if defined(PERL_NEED_MY_HTOBE32)
-PERL_CALLCONV U32      Perl_my_htobe32(U32 n);
-#endif
-#if defined(PERL_NEED_MY_HTOBE64)
-PERL_CALLCONV U64      Perl_my_htobe64(U64 n);
-#endif
-#if defined(PERL_NEED_MY_HTOBEI)
-PERL_CALLCONV int      Perl_my_htobei(int n);
-#endif
-#if defined(PERL_NEED_MY_HTOBEL)
-PERL_CALLCONV long     Perl_my_htobel(long n);
-#endif
-#if defined(PERL_NEED_MY_HTOBES)
-PERL_CALLCONV short    Perl_my_htobes(short n);
-#endif
-#if defined(PERL_NEED_MY_HTOLE16)
-PERL_CALLCONV U16      Perl_my_htole16(U16 n);
-#endif
-#if defined(PERL_NEED_MY_HTOLE32)
-PERL_CALLCONV U32      Perl_my_htole32(U32 n);
-#endif
-#if defined(PERL_NEED_MY_HTOLE64)
-PERL_CALLCONV U64      Perl_my_htole64(U64 n);
-#endif
-#if defined(PERL_NEED_MY_HTOLEI)
-PERL_CALLCONV int      Perl_my_htolei(int n);
-#endif
-#if defined(PERL_NEED_MY_HTOLEL)
-PERL_CALLCONV long     Perl_my_htolel(long n);
-#endif
-#if defined(PERL_NEED_MY_HTOLES)
-PERL_CALLCONV short    Perl_my_htoles(short n);
-#endif
-#if defined(PERL_NEED_MY_LETOH16)
-PERL_CALLCONV U16      Perl_my_letoh16(U16 n);
-#endif
-#if defined(PERL_NEED_MY_LETOH32)
-PERL_CALLCONV U32      Perl_my_letoh32(U32 n);
-#endif
-#if defined(PERL_NEED_MY_LETOH64)
-PERL_CALLCONV U64      Perl_my_letoh64(U64 n);
-#endif
-#if defined(PERL_NEED_MY_LETOHI)
-PERL_CALLCONV int      Perl_my_letohi(int n);
-#endif
-#if defined(PERL_NEED_MY_LETOHL)
-PERL_CALLCONV long     Perl_my_letohl(long n);
-#endif
-#if defined(PERL_NEED_MY_LETOHS)
-PERL_CALLCONV short    Perl_my_letohs(short n);
-#endif
 #if defined(PERL_USES_PL_PIDSTATUS) && defined(PERL_IN_UTIL_C)
 STATIC void    S_pidgone(pTHX_ Pid_t pid, int status);
 #endif
@@ -7893,6 +7845,14 @@ PERL_CALLCONV int        Perl_do_spawn_nowait(pTHX_ char* cmd)
        assert(cmd)
 
 #endif
+#if defined(_MSC_VER)
+PERL_CALLCONV int      Perl_magic_regdatum_set(pTHX_ SV* sv, MAGIC* mg)
+                       __attribute__nonnull__(pTHX_1)
+                       __attribute__nonnull__(pTHX_2);
+#define PERL_ARGS_ASSERT_MAGIC_REGDATUM_SET    \
+       assert(sv); assert(mg)
+
+#endif
 #ifdef PERL_CORE
 #  include "pp_proto.h"
 #endif