X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/2339a2013e49d6d22569f315a3add4ac4dd6649d..430f723e6dceffbacbd1d7160d35ee8a2b698448:/proto.h diff --git a/proto.h b/proto.h index a6b6853..37393e1 100644 --- a/proto.h +++ b/proto.h @@ -219,6 +219,13 @@ PERL_CALLCONV SV** Perl_av_arylen_p(pTHX_ AV *av); PERL_CALLCONV void Perl_av_clear(pTHX_ AV *av); #define PERL_ARGS_ASSERT_AV_CLEAR \ assert(av) +#ifndef PERL_NO_INLINE_FUNCTIONS +PERL_STATIC_INLINE Size_t Perl_av_count(pTHX_ AV *av) + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_AV_COUNT \ + assert(av) +#endif + PERL_CALLCONV void Perl_av_create_and_push(pTHX_ AV **const avp, SV *const val); #define PERL_ARGS_ASSERT_AV_CREATE_AND_PUSH \ assert(avp); assert(val) @@ -284,12 +291,9 @@ PERL_CALLCONV SV** Perl_av_store(pTHX_ AV *av, SSize_t key, SV *val); __attribute__warn_unused_result__; */ #define PERL_ARGS_ASSERT_AV_TINDEX -#ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE SSize_t Perl_av_top_index(pTHX_ AV *av) - __attribute__warn_unused_result__; -#define PERL_ARGS_ASSERT_AV_TOP_INDEX \ - assert(av) -#endif +/* PERL_CALLCONV SSize_t av_top_index(pTHX_ AV *av) + __attribute__warn_unused_result__; */ +#define PERL_ARGS_ASSERT_AV_TOP_INDEX PERL_CALLCONV void Perl_av_undef(pTHX_ AV *av); #define PERL_ARGS_ASSERT_AV_UNDEF \ @@ -656,6 +660,20 @@ PERL_CALLCONV void Perl_clear_defarray(pTHX_ AV* av, bool abandon); PERL_CALLCONV const COP* Perl_closest_cop(pTHX_ const COP *cop, const OP *o, const OP *curop, bool opnext); #define PERL_ARGS_ASSERT_CLOSEST_COP \ assert(cop) +PERL_CALLCONV OP* Perl_cmpchain_extend(pTHX_ I32 type, OP* ch, OP* right) + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_CMPCHAIN_EXTEND \ + assert(ch) + +PERL_CALLCONV OP* Perl_cmpchain_finish(pTHX_ OP* ch) + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_CMPCHAIN_FINISH \ + assert(ch) + +PERL_CALLCONV OP* Perl_cmpchain_start(pTHX_ I32 type, OP* left, OP* right) + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_CMPCHAIN_START + PERL_CALLCONV const char * Perl_cntrl_to_mnemonic(const U8 c) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_CNTRL_TO_MNEMONIC @@ -684,11 +702,9 @@ PERL_CALLCONV_NO_RET void Perl_croak_caller(const char* pat, ...) __attribute__format__null_ok__(__printf__,1,2); #define PERL_ARGS_ASSERT_CROAK_CALLER -#ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE_NO_RET void Perl_croak_memory_wrap(void) +PERL_CALLCONV_NO_RET void Perl_croak_memory_wrap(void) __attribute__noreturn__; #define PERL_ARGS_ASSERT_CROAK_MEMORY_WRAP -#endif PERL_CALLCONV_NO_RET void Perl_croak_no_mem(void) __attribute__noreturn__; @@ -821,12 +837,12 @@ PERL_CALLCONV SV * Perl_defelem_target(pTHX_ SV *sv, MAGIC *mg) PERL_CALLCONV void Perl_delete_eval_scope(pTHX); #define PERL_ARGS_ASSERT_DELETE_EVAL_SCOPE -PERL_CALLCONV char* Perl_delimcpy(char* to, const char* toend, const char* from, const char* fromend, int delim, I32* retlen); +PERL_CALLCONV char* Perl_delimcpy(char* to, const char* to_end, const char* from, const char* from_end, const int delim, I32* retlen); #define PERL_ARGS_ASSERT_DELIMCPY \ - assert(to); assert(toend); assert(from); assert(fromend); assert(retlen) -PERL_CALLCONV char* Perl_delimcpy_no_escape(char* to, const char* toend, const char* from, const char* fromend, int delim, I32* retlen); + assert(to); assert(to_end); assert(from); assert(from_end); assert(retlen) +PERL_CALLCONV char* Perl_delimcpy_no_escape(char* to, const char* to_end, const char* from, const char* from_end, const int delim, I32* retlen); #define PERL_ARGS_ASSERT_DELIMCPY_NO_ESCAPE \ - assert(to); assert(toend); assert(from); assert(fromend); assert(retlen) + assert(to); assert(to_end); assert(from); assert(from_end); assert(retlen) PERL_CALLCONV void Perl_despatch_signals(pTHX); #define PERL_ARGS_ASSERT_DESPATCH_SIGNALS PERL_CALLCONV_NO_RET OP* Perl_die(pTHX_ const char* pat, ...) @@ -1297,7 +1313,7 @@ PERL_CALLCONV GV* Perl_gv_fetchmethod_pvn_flags(pTHX_ HV* stash, const char* nam PERL_CALLCONV GV* Perl_gv_fetchmethod_sv_flags(pTHX_ HV* stash, SV* namesv, U32 flags); #define PERL_ARGS_ASSERT_GV_FETCHMETHOD_SV_FLAGS \ assert(stash); assert(namesv) -PERL_CALLCONV GV* Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 add, const svtype sv_type); +PERL_CALLCONV GV* Perl_gv_fetchpv(pTHX_ const char *nambeg, I32 flags, const svtype sv_type); #define PERL_ARGS_ASSERT_GV_FETCHPV \ assert(nambeg) PERL_CALLCONV GV* Perl_gv_fetchpvn_flags(pTHX_ const char* name, STRLEN len, I32 flags, const svtype sv_type); @@ -1841,9 +1857,15 @@ PERL_CALLCONV int Perl_magic_existspack(pTHX_ SV* sv, const MAGIC* mg); PERL_CALLCONV int Perl_magic_freearylen_p(pTHX_ SV* sv, MAGIC* mg); #define PERL_ARGS_ASSERT_MAGIC_FREEARYLEN_P \ assert(sv); assert(mg) +PERL_CALLCONV int Perl_magic_freemglob(pTHX_ SV* sv, MAGIC* mg); +#define PERL_ARGS_ASSERT_MAGIC_FREEMGLOB \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_freeovrld(pTHX_ SV* sv, MAGIC* mg); #define PERL_ARGS_ASSERT_MAGIC_FREEOVRLD \ assert(sv); assert(mg) +PERL_CALLCONV int Perl_magic_freeutf8(pTHX_ SV* sv, MAGIC* mg); +#define PERL_ARGS_ASSERT_MAGIC_FREEUTF8 \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_get(pTHX_ SV* sv, MAGIC* mg); #define PERL_ARGS_ASSERT_MAGIC_GET \ assert(sv); assert(mg) @@ -2567,10 +2589,12 @@ PERL_CALLCONV void Perl_optimize_optree(pTHX_ OP* o); #define PERL_ARGS_ASSERT_OPTIMIZE_OPTREE \ assert(o) #ifndef NO_MATHOMS -PERL_CALLCONV void Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags); +PERL_CALLCONV void Perl_pack_cat(pTHX_ SV *cat, const char *pat, const char *patend, SV **beglist, SV **endlist, SV ***next_in_list, U32 flags) + __attribute__deprecated__; #define PERL_ARGS_ASSERT_PACK_CAT \ assert(cat); assert(pat); assert(patend); assert(beglist); assert(endlist); assert(next_in_list) #endif + PERL_CALLCONV void Perl_package(pTHX_ OP* o); #define PERL_ARGS_ASSERT_PACKAGE \ assert(o) @@ -3229,7 +3253,7 @@ PERL_CALLCONV char* Perl_sv_2pv(pTHX_ SV *sv, STRLEN *lp); #define PERL_ARGS_ASSERT_SV_2PV \ assert(sv) #endif -PERL_CALLCONV char* Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags); +PERL_CALLCONV char* Perl_sv_2pv_flags(pTHX_ SV *const sv, STRLEN *const lp, const U32 flags); #define PERL_ARGS_ASSERT_SV_2PV_FLAGS \ assert(sv) #ifndef NO_MATHOMS @@ -3577,7 +3601,7 @@ PERL_CALLCONV char* Perl_sv_pvn_force(pTHX_ SV* sv, STRLEN* lp); #define PERL_ARGS_ASSERT_SV_PVN_FORCE \ assert(sv) #endif -PERL_CALLCONV char* Perl_sv_pvn_force_flags(pTHX_ SV *const sv, STRLEN *const lp, const I32 flags); +PERL_CALLCONV char* Perl_sv_pvn_force_flags(pTHX_ SV *const sv, STRLEN *const lp, const U32 flags); #define PERL_ARGS_ASSERT_SV_PVN_FORCE_FLAGS \ assert(sv) #ifndef NO_MATHOMS @@ -4174,13 +4198,6 @@ PERL_CALLCONV bool Perl_do_exec(pTHX_ const char* cmd); #define PERL_ARGS_ASSERT_DO_EXEC \ assert(cmd) #endif -#if !(defined(PERL_GLOBAL_STRUCT_PRIVATE)) -# if defined(PERL_IMPLICIT_CONTEXT) -PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ int *indexp, size_t size); -#define PERL_ARGS_ASSERT_MY_CXT_INIT \ - assert(indexp) -# endif -#endif #if !(defined(PERL_USE_3ARG_SIGHANDLER)) PERL_CALLCONV Signal_t Perl_csighandler(int sig); #define PERL_ARGS_ASSERT_CSIGHANDLER @@ -4783,25 +4800,6 @@ PERL_CALLCONV GV* Perl_gv_SVadd(pTHX_ GV *gv); #define PERL_ARGS_ASSERT_GV_SVADD #endif #endif -#if defined(PERL_GLOBAL_STRUCT) -PERL_CALLCONV struct perl_vars * Perl_GetVars(pTHX); -#define PERL_ARGS_ASSERT_GETVARS -PERL_CALLCONV void Perl_free_global_struct(pTHX_ struct perl_vars *plvarsp); -#define PERL_ARGS_ASSERT_FREE_GLOBAL_STRUCT \ - assert(plvarsp) -PERL_CALLCONV struct perl_vars* Perl_init_global_struct(pTHX); -#define PERL_ARGS_ASSERT_INIT_GLOBAL_STRUCT -#endif -#if defined(PERL_GLOBAL_STRUCT_PRIVATE) -# if defined(PERL_IMPLICIT_CONTEXT) -PERL_CALLCONV int Perl_my_cxt_index(pTHX_ const char *my_cxt_key); -#define PERL_ARGS_ASSERT_MY_CXT_INDEX \ - assert(my_cxt_key) -PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ const char *my_cxt_key, size_t size); -#define PERL_ARGS_ASSERT_MY_CXT_INIT \ - assert(my_cxt_key) -# endif -#endif #if defined(PERL_IMPLICIT_CONTEXT) PERL_CALLCONV_NO_RET void Perl_croak_nocontext(const char* pat, ...) __attribute__noreturn__ @@ -4839,6 +4837,9 @@ PERL_CALLCONV SV* Perl_mess_nocontext(const char* pat, ...) #define PERL_ARGS_ASSERT_MESS_NOCONTEXT \ assert(pat) +PERL_CALLCONV void* Perl_my_cxt_init(pTHX_ int *indexp, size_t size); +#define PERL_ARGS_ASSERT_MY_CXT_INIT \ + assert(indexp) PERL_CALLCONV SV* Perl_newSVpvf_nocontext(const char *const pat, ...) __attribute__format__(__printf__,1,2); #define PERL_ARGS_ASSERT_NEWSVPVF_NOCONTEXT \ @@ -5508,6 +5509,14 @@ PERL_STATIC_INLINE HV* S_opmethod_stash(pTHX_ SV* meth); #define PERL_ARGS_ASSERT_OPMETHOD_STASH \ assert(meth) #endif +#ifndef PERL_NO_INLINE_FUNCTIONS +PERL_STATIC_FORCE_INLINE bool S_should_we_output_Debug_r(pTHX_ regexp * prog) + __attribute__warn_unused_result__ + __attribute__always_inline__; +#define PERL_ARGS_ASSERT_SHOULD_WE_OUTPUT_DEBUG_R \ + assert(prog) +#endif + #endif #if defined(PERL_IN_PP_PACK_C) STATIC int S_div128(pTHX_ SV *pnum, bool *done); @@ -5703,11 +5712,9 @@ STATIC REGEXP* S_compile_wildcard(pTHX_ const char * subpattern, const STRLEN le #define PERL_ARGS_ASSERT_COMPILE_WILDCARD \ assert(subpattern) -#ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE U8 S_compute_EXACTish(RExC_state_t *pRExC_state); +STATIC U8 S_compute_EXACTish(RExC_state_t *pRExC_state); #define PERL_ARGS_ASSERT_COMPUTE_EXACTISH \ assert(pRExC_state) -#endif STATIC regnode * S_construct_ahocorasick_from_trie(pTHX_ RExC_state_t *pRExC_state, regnode *source, U32 depth); #define PERL_ARGS_ASSERT_CONSTRUCT_AHOCORASICK_FROM_TRIE \ assert(pRExC_state); assert(source) @@ -5735,14 +5742,12 @@ STATIC SV* S_get_ANYOF_cp_list_for_ssc(pTHX_ const RExC_state_t *pRExC_state, co STATIC bool S_grok_bslash_N(pTHX_ RExC_state_t *pRExC_state, regnode_offset* nodep, UV *code_point_p, int* cp_count, I32 *flagp, const bool strict, const U32 depth); #define PERL_ARGS_ASSERT_GROK_BSLASH_N \ assert(pRExC_state); assert(flagp) -#ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE regnode_offset S_handle_named_backref(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, char * parse_start, char ch); +STATIC regnode_offset S_handle_named_backref(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, char * parse_start, char ch); #define PERL_ARGS_ASSERT_HANDLE_NAMED_BACKREF \ assert(pRExC_state); assert(flagp); assert(parse_start) -#endif -STATIC bool S_handle_names_wildcard(pTHX_ const char * wname, const STRLEN wname_len, SV ** prop_definition); +STATIC bool S_handle_names_wildcard(pTHX_ const char * wname, const STRLEN wname_len, SV ** prop_definition, AV ** strings); #define PERL_ARGS_ASSERT_HANDLE_NAMES_WILDCARD \ - assert(wname); assert(prop_definition) + assert(wname); assert(prop_definition); assert(strings) STATIC int S_handle_possible_posix(pTHX_ RExC_state_t *pRExC_state, const char* const s, char ** updated_parse_ptr, AV** posix_warnings, const bool check_only); #define PERL_ARGS_ASSERT_HANDLE_POSSIBLE_POSIX \ assert(pRExC_state); assert(s) @@ -5801,12 +5806,15 @@ STATIC void S_output_posix_warnings(pTHX_ RExC_state_t *pRExC_state, AV* posix_w STATIC void S_parse_lparen_question_flags(pTHX_ RExC_state_t *pRExC_state); #define PERL_ARGS_ASSERT_PARSE_LPAREN_QUESTION_FLAGS \ assert(pRExC_state) -STATIC SV * S_parse_uniprop_string(pTHX_ const char * const name, Size_t name_len, const bool is_utf8, const bool to_fold, const bool runtime, const bool deferrable, bool * user_defined_ptr, SV * msg, const STRLEN level); +STATIC SV * S_parse_uniprop_string(pTHX_ const char * const name, Size_t name_len, const bool is_utf8, const bool to_fold, const bool runtime, const bool deferrable, AV ** strings, bool * user_defined_ptr, SV * msg, const STRLEN level); #define PERL_ARGS_ASSERT_PARSE_UNIPROP_STRING \ assert(name); assert(user_defined_ptr); assert(msg) STATIC void S_populate_ANYOF_from_invlist(pTHX_ regnode *node, SV** invlist_ptr); #define PERL_ARGS_ASSERT_POPULATE_ANYOF_FROM_INVLIST \ assert(node); assert(invlist_ptr) +STATIC void S_rck_elide_nothing(pTHX_ regnode *node); +#define PERL_ARGS_ASSERT_RCK_ELIDE_NOTHING \ + assert(node) PERL_STATIC_NO_RET void S_re_croak(pTHX_ bool utf8, const char* pat, ...) __attribute__noreturn__ __attribute__format__(__printf__,pTHX_2,pTHX_3); @@ -5855,7 +5863,7 @@ STATIC regnode_offset S_regnode_guts(pTHX_ RExC_state_t *pRExC_state, const U8 o STATIC regnode_offset S_regpiece(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, U32 depth); #define PERL_ARGS_ASSERT_REGPIECE \ assert(pRExC_state); assert(flagp) -STATIC regnode_offset S_regpnode(pTHX_ RExC_state_t *pRExC_state, U8 op, void * arg); +STATIC regnode_offset S_regpnode(pTHX_ RExC_state_t *pRExC_state, U8 op, SV * arg); #define PERL_ARGS_ASSERT_REGPNODE \ assert(pRExC_state); assert(arg) STATIC bool S_regtail(pTHX_ RExC_state_t * pRExC_state, const regnode_offset p, const regnode_offset val, const U32 depth) @@ -5875,38 +5883,30 @@ STATIC void S_set_regex_pv(pTHX_ RExC_state_t *pRExC_state, REGEXP *Rx); STATIC void S_skip_to_be_ignored_text(pTHX_ RExC_state_t *pRExC_state, char ** p, const bool force_to_xmod); #define PERL_ARGS_ASSERT_SKIP_TO_BE_IGNORED_TEXT \ assert(pRExC_state); assert(p) -#ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE void S_ssc_add_range(pTHX_ regnode_ssc *ssc, UV const start, UV const end); +STATIC void S_ssc_add_range(pTHX_ regnode_ssc *ssc, UV const start, UV const end); #define PERL_ARGS_ASSERT_SSC_ADD_RANGE \ assert(ssc) -#endif STATIC void S_ssc_and(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *and_with); #define PERL_ARGS_ASSERT_SSC_AND \ assert(pRExC_state); assert(ssc); assert(and_with) STATIC void S_ssc_anything(pTHX_ regnode_ssc *ssc); #define PERL_ARGS_ASSERT_SSC_ANYTHING \ assert(ssc) -#ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE void S_ssc_clear_locale(regnode_ssc *ssc); +STATIC void S_ssc_clear_locale(regnode_ssc *ssc); #define PERL_ARGS_ASSERT_SSC_CLEAR_LOCALE \ assert(ssc) -#endif -#ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE void S_ssc_cp_and(pTHX_ regnode_ssc *ssc, UV const cp); +STATIC void S_ssc_cp_and(pTHX_ regnode_ssc *ssc, UV const cp); #define PERL_ARGS_ASSERT_SSC_CP_AND \ assert(ssc) -#endif STATIC void S_ssc_finalize(pTHX_ RExC_state_t *pRExC_state, regnode_ssc *ssc); #define PERL_ARGS_ASSERT_SSC_FINALIZE \ assert(pRExC_state); assert(ssc) STATIC void S_ssc_init(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc); #define PERL_ARGS_ASSERT_SSC_INIT \ assert(pRExC_state); assert(ssc) -#ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE void S_ssc_intersection(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd); +STATIC void S_ssc_intersection(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd); #define PERL_ARGS_ASSERT_SSC_INTERSECTION \ assert(ssc); assert(invlist) -#endif STATIC int S_ssc_is_anything(const regnode_ssc *ssc) __attribute__warn_unused_result__; #define PERL_ARGS_ASSERT_SSC_IS_ANYTHING \ @@ -5920,12 +5920,10 @@ STATIC int S_ssc_is_cp_posixl_init(const RExC_state_t *pRExC_state, const regnod STATIC void S_ssc_or(pTHX_ const RExC_state_t *pRExC_state, regnode_ssc *ssc, const regnode_charclass *or_with); #define PERL_ARGS_ASSERT_SSC_OR \ assert(pRExC_state); assert(ssc); assert(or_with) -#ifndef PERL_NO_INLINE_FUNCTIONS -PERL_STATIC_INLINE void S_ssc_union(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd); +STATIC void S_ssc_union(pTHX_ regnode_ssc *ssc, SV* const invlist, const bool invert_2nd); #define PERL_ARGS_ASSERT_SSC_UNION \ assert(ssc); assert(invlist) -#endif -STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_ssc *and_withp, U32 flags, U32 depth); +STATIC SSize_t S_study_chunk(pTHX_ RExC_state_t *pRExC_state, regnode **scanp, SSize_t *minlenp, SSize_t *deltap, regnode *last, struct scan_data_t *data, I32 stopparen, U32 recursed_depth, regnode_ssc *and_withp, U32 flags, U32 depth, bool was_mutate_ok); #define PERL_ARGS_ASSERT_STUDY_CHUNK \ assert(pRExC_state); assert(scanp); assert(minlenp); assert(deltap); assert(last) #endif @@ -6788,6 +6786,9 @@ PERL_CALLCONV bool Perl__is_cur_LC_category_utf8(pTHX_ int category); #define PERL_ARGS_ASSERT__IS_CUR_LC_CATEGORY_UTF8 #endif #if defined(USE_LOCALE_COLLATE) +PERL_CALLCONV int Perl_magic_freecollxfrm(pTHX_ SV* sv, MAGIC* mg); +#define PERL_ARGS_ASSERT_MAGIC_FREECOLLXFRM \ + assert(sv); assert(mg) PERL_CALLCONV int Perl_magic_setcollxfrm(pTHX_ SV* sv, MAGIC* mg); #define PERL_ARGS_ASSERT_MAGIC_SETCOLLXFRM \ assert(sv); assert(mg) @@ -6885,7 +6886,7 @@ PERL_CALLCONV_NO_RET void win32_croak_not_implemented(const char * fname) assert(fname) #endif -#if defined(WIN32) || defined(__SYMBIAN32__) || defined(VMS) +#if defined(WIN32) || defined(VMS) PERL_CALLCONV int Perl_do_aspawn(pTHX_ SV* really, SV** mark, SV** sp); #define PERL_ARGS_ASSERT_DO_ASPAWN \ assert(mark); assert(sp)