X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/c60dbbc3880c0d4c4f81d95fb1d70b608f96a645..7778d8049861df5954e61187039e2f815b0b4370:/proto.h diff --git a/proto.h b/proto.h index 4da34b9..c28ec54 100644 --- a/proto.h +++ b/proto.h @@ -29,18 +29,36 @@ PERL_CALLCONV bool Perl__is_utf8__perl_idstart(pTHX_ const U8 *p) #define PERL_ARGS_ASSERT__IS_UTF8__PERL_IDSTART \ assert(p) -PERL_CALLCONV UV Perl__to_uni_fold_flags(pTHX_ UV c, U8 *p, STRLEN *lenp, U8 flags) +PERL_CALLCONV UV Perl__to_uni_fold_flags(pTHX_ UV c, U8 *p, STRLEN *lenp, const bool flags) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); #define PERL_ARGS_ASSERT__TO_UNI_FOLD_FLAGS \ assert(p); assert(lenp) -PERL_CALLCONV UV Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags) +PERL_CALLCONV UV Perl__to_utf8_fold_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, U8 flags, bool* tainted_ptr) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); #define PERL_ARGS_ASSERT__TO_UTF8_FOLD_FLAGS \ assert(p); assert(ustrp) +PERL_CALLCONV UV Perl__to_utf8_lower_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, const bool flags, bool* tainted_ptr) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT__TO_UTF8_LOWER_FLAGS \ + assert(p); assert(ustrp) + +PERL_CALLCONV UV Perl__to_utf8_title_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, const bool flags, bool* tainted_ptr) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT__TO_UTF8_TITLE_FLAGS \ + assert(p); assert(ustrp) + +PERL_CALLCONV UV Perl__to_utf8_upper_flags(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, const bool flags, bool* tainted_ptr) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT__TO_UTF8_UPPER_FLAGS \ + assert(p); assert(ustrp) + PERL_CALLCONV PADOFFSET Perl_allocmy(pTHX_ const char *const name, const STRLEN len, const U32 flags) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_ALLOCMY \ @@ -290,6 +308,12 @@ PERL_CALLCONV OP * Perl_ck_chdir(pTHX_ OP *o) #define PERL_ARGS_ASSERT_CK_CHDIR \ assert(o) +PERL_CALLCONV OP * Perl_ck_cmp(pTHX_ OP *o) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_CMP \ + assert(o) + PERL_CALLCONV OP * Perl_ck_concat(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -412,6 +436,12 @@ PERL_CALLCONV OP * Perl_ck_join(pTHX_ OP *o) #define PERL_ARGS_ASSERT_CK_JOIN \ assert(o) +PERL_CALLCONV OP * Perl_ck_length(pTHX_ OP *o) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_LENGTH \ + assert(o) + PERL_CALLCONV OP * Perl_ck_lfun(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -544,6 +574,12 @@ PERL_CALLCONV OP * Perl_ck_svconst(pTHX_ OP *o) #define PERL_ARGS_ASSERT_CK_SVCONST \ assert(o) +PERL_CALLCONV OP * Perl_ck_tell(pTHX_ OP *o) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_CK_TELL \ + assert(o) + PERL_CALLCONV OP * Perl_ck_trunc(pTHX_ OP *o) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); @@ -2271,6 +2307,12 @@ PERL_CALLCONV int Perl_magic_setvec(pTHX_ SV* sv, MAGIC* mg) #define PERL_ARGS_ASSERT_MAGIC_SETVEC \ assert(sv); assert(mg) +PERL_CALLCONV int Perl_magic_setvstring(pTHX_ SV* sv, MAGIC* mg) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_MAGIC_SETVSTRING \ + assert(sv); assert(mg) + PERL_CALLCONV U32 Perl_magic_sizepack(pTHX_ SV* sv, MAGIC* mg) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); @@ -2528,7 +2570,7 @@ PERL_CALLCONV OP* Perl_newCONDOP(pTHX_ I32 flags, OP* first, OP* trueop, OP* fal assert(first) PERL_CALLCONV CV* Perl_newCONSTSUB(pTHX_ HV* stash, const char* name, SV* sv); -PERL_CALLCONV CV* Perl_newCONSTSUB_flags(pTHX_ HV* stash, const char* name, U32 flags, SV* sv); +PERL_CALLCONV CV* Perl_newCONSTSUB_flags(pTHX_ HV* stash, const char* name, STRLEN len, U32 flags, SV* sv); PERL_CALLCONV OP* Perl_newCVREF(pTHX_ I32 flags, OP* o) __attribute__malloc__ __attribute__warn_unused_result__; @@ -2769,6 +2811,12 @@ PERL_CALLCONV CV * Perl_newXS_flags(pTHX_ const char *name, XSUBADDR_t subaddr, #define PERL_ARGS_ASSERT_NEWXS_FLAGS \ assert(subaddr); assert(filename) +PERL_CALLCONV CV * Perl_newXS_len_flags(pTHX_ const char *name, STRLEN len, XSUBADDR_t subaddr, const char *const filename, const char *const proto, SV **const_svp, U32 flags) + __attribute__nonnull__(pTHX_3) + __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_NEWXS_LEN_FLAGS \ + assert(subaddr); assert(filename) + PERL_CALLCONV void Perl_new_collate(pTHX_ const char* newcoll); PERL_CALLCONV void Perl_new_ctype(pTHX_ const char* newctype) __attribute__nonnull__(pTHX_1); @@ -3244,7 +3292,7 @@ PERL_CALLCONV void Perl_regprop(pTHX_ const regexp *prog, SV* sv, const regnode* #define PERL_ARGS_ASSERT_REGPROP \ assert(sv); assert(o) -PERL_CALLCONV void Perl_repeatcpy(char* to, const char* from, I32 len, I32 count) +PERL_CALLCONV void Perl_repeatcpy(char* to, const char* from, I32 len, IV count) __attribute__nonnull__(1) __attribute__nonnull__(2); #define PERL_ARGS_ASSERT_REPEATCPY \ @@ -4339,6 +4387,7 @@ PERL_CALLCONV UV Perl_swash_fetch(pTHX_ SV *swash, const U8 *ptr, bool do_utf8) assert(swash); assert(ptr) PERL_CALLCONV SV* Perl_swash_init(pTHX_ const char* pkg, const char* name, SV* listsv, I32 minbits, I32 none) + __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) __attribute__nonnull__(pTHX_3); @@ -4419,22 +4468,24 @@ PERL_CALLCONV UV Perl_to_utf8_case(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp, S /* PERL_CALLCONV UV Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2); */ +#define PERL_ARGS_ASSERT_TO_UTF8_FOLD \ + assert(p); assert(ustrp) -PERL_CALLCONV UV Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +/* PERL_CALLCONV UV Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); + __attribute__nonnull__(pTHX_2); */ #define PERL_ARGS_ASSERT_TO_UTF8_LOWER \ assert(p); assert(ustrp) -PERL_CALLCONV UV Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +/* PERL_CALLCONV UV Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); + __attribute__nonnull__(pTHX_2); */ #define PERL_ARGS_ASSERT_TO_UTF8_TITLE \ assert(p); assert(ustrp) -PERL_CALLCONV UV Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +/* PERL_CALLCONV UV Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) __attribute__nonnull__(pTHX_1) - __attribute__nonnull__(pTHX_2); + __attribute__nonnull__(pTHX_2); */ #define PERL_ARGS_ASSERT_TO_UTF8_UPPER \ assert(p); assert(ustrp) @@ -5415,9 +5466,7 @@ STATIC SV* S_pm_description(pTHX_ const PMOP *pm) #define PERL_ARGS_ASSERT_PM_DESCRIPTION \ assert(pm) -STATIC void S_sequence(pTHX_ const OP *o); STATIC UV S_sequence_num(pTHX_ const OP *o); -STATIC void S_sequence_tail(pTHX_ const OP *o); # if defined(PERL_MAD) STATIC void S_xmldump_attr(pTHX_ I32 level, PerlIO *file, const char* pat, ...) __attribute__format__(__printf__,pTHX_3,pTHX_4) @@ -5428,7 +5477,7 @@ STATIC void S_xmldump_attr(pTHX_ I32 level, PerlIO *file, const char* pat, ...) # endif #endif -#if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) +#if defined(PERL_IN_DUMP_C) || defined(PERL_IN_HV_C) || defined(PERL_IN_SV_C) || defined(PERL_IN_SCOPE_C) PERL_CALLCONV void Perl_hv_kill_backrefs(pTHX_ HV *hv) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_HV_KILL_BACKREFS \ @@ -5585,6 +5634,14 @@ STATIC void S_save_magic(pTHX_ I32 mgs_ix, SV *sv) STATIC void S_unwind_handler_stack(pTHX_ const void *p); #endif +#if defined(PERL_IN_MG_C) || defined(PERL_IN_PP_C) +PERL_CALLCONV bool Perl_translate_substr_offsets(pTHX_ STRLEN curlen, IV pos1_iv, bool pos1_is_uv, IV len_iv, bool len_is_uv, STRLEN *posp, STRLEN *lenp) + __attribute__nonnull__(pTHX_6) + __attribute__nonnull__(pTHX_7); +#define PERL_ARGS_ASSERT_TRANSLATE_SUBSTR_OFFSETS \ + assert(posp); assert(lenp) + +#endif #if defined(PERL_IN_MRO_C) STATIC void S_mro_clean_isarev(pTHX_ HV * const isa, const char * const name, const STRLEN len, HV * const exceptions, U32 flags) __attribute__nonnull__(pTHX_1) @@ -5787,6 +5844,14 @@ STATIC void S_forget_pmop(pTHX_ PMOP *const o, U32 flags) # endif #endif +#if defined(PERL_IN_OP_C) || defined(PERL_IN_SV_C) +PERL_CALLCONV void Perl_report_redefined_cv(pTHX_ const SV *name, const CV *old_cv, SV * const *new_const_svp) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_REPORT_REDEFINED_CV \ + assert(name); assert(old_cv) + +#endif #if defined(PERL_IN_PAD_C) STATIC PADOFFSET S_pad_alloc_name(pTHX_ SV *namesv, U32 flags, HV *typestash, HV *ourstash) __attribute__nonnull__(pTHX_1); @@ -5836,6 +5901,14 @@ STATIC void S_init_postdump_symbols(pTHX_ int argc, char **argv, char **env) assert(argv) STATIC void S_init_predump_symbols(pTHX); +STATIC SV* S_mayberelocate(pTHX_ const char *const dir, STRLEN len, U32 flags) + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_MAYBERELOCATE \ + assert(dir) + +STATIC void S_minus_v(pTHX) + __attribute__noreturn__; + STATIC void S_my_exit_jump(pTHX) __attribute__noreturn__; @@ -5851,10 +5924,8 @@ STATIC void* S_parse_body(pTHX_ char **env, XSINIT_t xsinit); STATIC void S_run_body(pTHX_ I32 oldscope) __attribute__noreturn__; -STATIC void S_usage(pTHX_ const char *name) - __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_USAGE \ - assert(name) +STATIC void S_usage(pTHX) + __attribute__noreturn__; #endif #if defined(PERL_IN_PP_C) @@ -5905,7 +5976,7 @@ STATIC OP* S_do_smartmatch(pTHX_ HV* seen_this, HV* seen_other, const bool copie STATIC OP* S_docatch(pTHX_ OP *o) __attribute__warn_unused_result__; -STATIC bool S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq); +STATIC bool S_doeval(pTHX_ int gimme, OP** startop, CV* outside, U32 seq, HV* hh); STATIC OP* S_dofindlabel(pTHX_ OP *o, const char *label, OP **opstack, OP **oplimit) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) @@ -6284,6 +6355,12 @@ PERL_STATIC_INLINE UV S_invlist_max(pTHX_ SV* const invlist) #define PERL_ARGS_ASSERT_INVLIST_MAX \ assert(invlist) +STATIC IV S_invlist_search(pTHX_ SV* const invlist, const UV cp) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT_INVLIST_SEARCH \ + assert(invlist) + PERL_STATIC_INLINE void S_invlist_set_len(pTHX_ SV* const invlist, const UV len) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_INVLIST_SET_LEN \ @@ -6452,6 +6529,21 @@ STATIC I32 S_study_chunk(pTHX_ struct RExC_state_t *pRExC_state, regnode **scanp assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last) #endif +#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) +PERL_CALLCONV SV* Perl__core_swash_init(pTHX_ const char* pkg, const char* name, SV* listsv, I32 minbits, I32 none, bool return_if_undef, SV* invlist, bool passed_in_invlist_has_user_defined_property) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT__CORE_SWASH_INIT \ + assert(pkg); assert(name); assert(listsv) + +PERL_CALLCONV SV* Perl__invlist_contents(pTHX_ SV* const invlist) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1); +#define PERL_ARGS_ASSERT__INVLIST_CONTENTS \ + assert(invlist) + +#endif #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_UTF8_C) PERL_CALLCONV void Perl__append_range_to_invlist(pTHX_ SV* const invlist, const UV start, const UV end) __attribute__nonnull__(pTHX_1); @@ -6475,6 +6567,12 @@ PERL_CALLCONV void Perl__invlist_invert_prop(pTHX_ SV* const invlist) #define PERL_ARGS_ASSERT__INVLIST_INVERT_PROP \ assert(invlist) +PERL_CALLCONV void Perl__invlist_populate_swatch(pTHX_ SV* const invlist, const UV start, const UV end, U8* swatch) + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT__INVLIST_POPULATE_SWATCH \ + assert(invlist); assert(swatch) + PERL_CALLCONV void Perl__invlist_subtract(pTHX_ SV* const a, SV* const b, SV** result) __attribute__nonnull__(pTHX_1) __attribute__nonnull__(pTHX_2) @@ -6506,6 +6604,12 @@ PERL_CALLCONV SV* Perl__swash_to_invlist(pTHX_ SV* const swash) #endif #if defined(PERL_IN_REGEXEC_C) +STATIC SV* S_core_regclass_swash(pTHX_ const regexp *prog, const struct regnode *node, bool doinit, SV **listsvp, SV **altsvp) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_2); +#define PERL_ARGS_ASSERT_CORE_REGCLASS_SWASH \ + assert(node) + STATIC char* S_find_byclass(pTHX_ regexp * prog, const regnode *c, char *s, const char *strend, regmatch_info *reginfo) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1) @@ -6708,7 +6812,7 @@ STATIC STRLEN S_sv_pos_u2b_midway(const U8 *const start, const U8 *send, STRLEN #define PERL_ARGS_ASSERT_SV_POS_U2B_MIDWAY \ assert(start); assert(send) -STATIC void S_sv_unglob(pTHX_ SV *const sv) +PERL_STATIC_INLINE void S_sv_unglob(pTHX_ SV *const sv, U32 flags) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_SV_UNGLOB \ assert(sv) @@ -6732,9 +6836,6 @@ STATIC void S_utf8_mg_pos_cache_update(pTHX_ SV *const sv, MAGIC **const mgp, co #define PERL_ARGS_ASSERT_UTF8_MG_POS_CACHE_UPDATE \ assert(sv); assert(mgp) -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__; - STATIC I32 S_visit(pTHX_ SVFUNC_t f, const U32 flags, const U32 mask) __attribute__nonnull__(pTHX_1); #define PERL_ARGS_ASSERT_VISIT \ @@ -6771,6 +6872,11 @@ STATIC void S_unreferenced_to_tmp_stack(pTHX_ AV *const unreferenced) # endif #endif +#if defined(PERL_IN_SV_C) || defined (PERL_IN_OP_C) +PERL_CALLCONV SV * Perl_varname(pTHX_ const GV *const gv, const char gvtype, PADOFFSET targ, const SV *const keyname, I32 aindex, int subscript_type) + __attribute__warn_unused_result__; + +#endif #if defined(PERL_IN_TOKE_C) STATIC int S_ao(pTHX_ int toketype); STATIC void S_check_uni(pTHX); @@ -6979,6 +7085,20 @@ STATIC bool S_isa_lookup(pTHX_ HV *stash, const char * const name, STRLEN len, U #endif #if defined(PERL_IN_UTF8_C) +PERL_CALLCONV UV Perl__to_fold_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const bool flags) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT__TO_FOLD_LATIN1 \ + assert(p); assert(lenp) + +STATIC UV S_check_locale_boundary_crossing(pTHX_ const U8* const p, const UV result, U8* const ustrp, STRLEN *lenp) + __attribute__warn_unused_result__ + __attribute__nonnull__(pTHX_1) + __attribute__nonnull__(pTHX_3) + __attribute__nonnull__(pTHX_4); +#define PERL_ARGS_ASSERT_CHECK_LOCALE_BOUNDARY_CROSSING \ + assert(p); assert(ustrp); assert(lenp) + STATIC STRLEN S_is_utf8_char_slow(const U8 *s, const STRLEN len) __attribute__warn_unused_result__ __attribute__nonnull__(1); @@ -6993,12 +7113,23 @@ STATIC bool S_is_utf8_common(pTHX_ const U8 *const p, SV **swash, const char * c #define PERL_ARGS_ASSERT_IS_UTF8_COMMON \ assert(p); assert(swash); assert(swashname) -STATIC SV* S_swash_get(pTHX_ SV* swash, UV start, UV span) +STATIC SV* S_swatch_get(pTHX_ SV* swash, UV start, UV span) __attribute__warn_unused_result__ __attribute__nonnull__(pTHX_1); -#define PERL_ARGS_ASSERT_SWASH_GET \ +#define PERL_ARGS_ASSERT_SWATCH_GET \ assert(swash) +STATIC U8 S_to_lower_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp) + __attribute__warn_unused_result__; + +#endif +#if defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C) +PERL_CALLCONV UV Perl__to_upper_title_latin1(pTHX_ const U8 c, U8 *p, STRLEN *lenp, const char S_or_s) + __attribute__nonnull__(pTHX_2) + __attribute__nonnull__(pTHX_3); +#define PERL_ARGS_ASSERT__TO_UPPER_TITLE_LATIN1 \ + assert(p); assert(lenp) + #endif #if defined(PERL_IN_UTIL_C) STATIC bool S_ckwarn_common(pTHX_ U32 w);