This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
make POP_SAVEARRAY() safe
[perl5.git] / embed.fnc
index d9b43d1..0e02afe 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -231,7 +231,9 @@ Apd |void   |av_push        |NN AV *av|NN SV *val
 EXp    |void   |av_reify       |NN AV *av
 ApdR   |SV*    |av_shift       |NN AV *av
 Apd    |SV**   |av_store       |NN AV *av|SSize_t key|NULLOK SV *val
+#ifndef PERL_NO_INLINE_FUNCTIONS
 AidR   |SSize_t|av_top_index   |NN AV *av
+#endif
 AmpdR  |SSize_t|av_tindex      |NN AV *av
 Apd    |void   |av_undef       |NN AV *av
 ApdoxM |SV**   |av_create_and_unshift_one|NN AV **const avp|NN SV *const val
@@ -654,7 +656,9 @@ pR  |OP*    |invert         |NULLOK OP* cmd
 ApR    |I32    |is_lvalue_sub
 : Used in cop.h
 XopR   |I32    |was_lvalue_sub
+#ifndef PERL_NO_INLINE_FUNCTIONS
 AiMRn  |STRLEN |_is_utf8_char_slow|NN const U8 *s|NN const U8 *e
+#endif
 ADMpPR |U32    |to_uni_upper_lc|U32 c
 ADMpPR |U32    |to_uni_title_lc|U32 c
 ADMpPR |U32    |to_uni_lower_lc|U32 c
@@ -1166,7 +1170,7 @@ Ap        |SV*    |regclass_swash |NULLOK const regexp *prog \
                                |NULLOK SV **listsvp|NULLOK SV **altsvp
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_UTF8_C)
 AMpR   |SV*    |_new_invlist_C_array|NN const UV* const list
-: Not used currently: EXMs     |bool   |_invlistEQ     |NN SV* const a|NN SV* const b|const bool complement_b
+EXMp   |bool   |_invlistEQ     |NN SV* const a|NN SV* const b|const bool complement_b
 #endif
 Ap     |I32    |pregexec       |NN REGEXP * const prog|NN char* stringarg \
                                |NN char* strend|NN char* strbeg \
@@ -1275,7 +1279,7 @@ Apmb      |void   |save_freepv    |NULLOK char* pv
 Ap     |void   |save_generic_svref|NN SV** sptr
 Ap     |void   |save_generic_pvref|NN char** str
 Ap     |void   |save_shared_pvref|NN char** str
-A    |void   |save_gp        |NN GV* gv|I32 empty
+Adp    |void   |save_gp        |NN GV* gv|I32 empty
 Ap     |HV*    |save_hash      |NN GV* gv
 Ap     |void   |save_hints
 Amp    |void   |save_helem     |NN HV *hv|NN SV *key|NN SV **sptr
@@ -1374,7 +1378,7 @@ Apd       |I32    |sv_true        |NULLOK SV *const sv
 sd     |void   |sv_add_arena   |NN char *const ptr|const U32 size \
                                |const U32 flags
 #endif
-Apdn   |int    |sv_backoff     |NN SV *const sv
+Apdn   |void   |sv_backoff     |NN SV *const sv
 Apd    |SV*    |sv_bless       |NN SV *const sv|NN HV *const stash
 #if defined(PERL_DEBUG_READONLY_COW)
 p      |void   |sv_buf_to_ro   |NN SV *sv
@@ -1446,7 +1450,9 @@ Apd       |void   |sv_magic       |NN SV *const sv|NULLOK SV *const obj|const int how \
 Apd    |MAGIC *|sv_magicext    |NN SV *const sv|NULLOK SV *const obj|const int how \
                                |NULLOK const MGVTBL *const vtbl|NULLOK const char *const name \
                                |const I32 namlen
+#ifndef PERL_NO_INLINE_FUNCTIONS
 Ein    |bool   |sv_only_taint_gmagic|NN SV *sv
+#endif
 : exported for re.pm
 EXp    |MAGIC *|sv_magicext_mglob|NN SV *sv
 ApdbamR        |SV*    |sv_mortalcopy  |NULLOK SV *const oldsv
@@ -1467,7 +1473,7 @@ Apd       |char*  |sv_recode_to_utf8      |NN SV* sv|NN SV *encoding
 Apd    |bool   |sv_cat_decode  |NN SV* dsv|NN SV *encoding|NN SV *ssv|NN int *offset \
                                |NN char* tstr|int tlen
 ApdR   |const char*    |sv_reftype     |NN const SV *const sv|const int ob
-pd     |SV*    |sv_ref |NULLOK SV *dst|NN const SV *const sv|const int ob
+Apd    |SV*    |sv_ref |NULLOK SV *dst|NN const SV *const sv|const int ob
 Apd    |void   |sv_replace     |NN SV *const sv|NN SV *const nsv
 Apd    |void   |sv_report_used
 Apd    |void   |sv_reset       |NN const char* s|NULLOK HV *const stash
@@ -1585,8 +1591,21 @@ EXMp     |void   |_invlist_dump  |NN PerlIO *file|I32 level   \
 #endif
 Ap     |void   |taint_env
 Ap     |void   |taint_proper   |NULLOK const char* f|NN const char *const s
-Apd    |UV     |to_utf8_case   |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp \
-                               |NN SV **swashp|NN const char *normal|NULLOK const char *special
+ApdD   |UV     |to_utf8_case   |NN const U8 *p                                 \
+                               |NN U8* ustrp                                   \
+                               |NULLOK STRLEN *lenp                            \
+                               |NN SV **swashp                                 \
+                               |NN const char *normal|                         \
+                               NULLOK const char *special
+#if defined(PERL_IN_UTF8_C)
+s      |UV     |_to_utf8_case  |const UV uv1                                   \
+                               |NN const U8 *p                                 \
+                               |NN U8* ustrp                                   \
+                               |NULLOK STRLEN *lenp                            \
+                               |NN SV **swashp                                 \
+                               |NN const char *normal                          \
+                               |NULLOK const char *special
+#endif
 Abmd   |UV     |to_utf8_lower  |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
 AMp    |UV     |_to_utf8_lower_flags   |NN const U8 *p|NN U8* ustrp  \
                                |NULLOK STRLEN *lenp|bool flags
@@ -1690,8 +1709,10 @@ Am       |I32    |whichsig       |NN const char* sig
 Ap     |I32    |whichsig_sv    |NN SV* sigsv
 Ap     |I32    |whichsig_pv    |NN const char* sig
 Ap     |I32    |whichsig_pvn   |NN const char* sig|STRLEN len
+#ifndef PERL_NO_INLINE_FUNCTIONS
 : used to check for NULs in pathnames and other names
 AiR    |bool   |is_safe_syscall|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name
+#endif
 #ifdef PERL_CORE
 inR    |bool   |should_warn_nl|NN const char *pv
 #endif
@@ -2075,9 +2096,9 @@ s |I32    |sv_i_ncmp      |NN SV *const a|NN SV *const b
 s      |I32    |amagic_ncmp    |NN SV *const a|NN SV *const b
 s      |I32    |amagic_i_ncmp  |NN SV *const a|NN SV *const b
 s      |I32    |amagic_cmp     |NN SV *const str1|NN SV *const str2
-#   ifdef USE_LOCALE_COLLATE
+#  ifdef USE_LOCALE_COLLATE
 s      |I32    |amagic_cmp_locale|NN SV *const str1|NN SV *const str2
-#endif
+#  endif
 s      |I32    |sortcv         |NN SV *const a|NN SV *const b
 s      |I32    |sortcv_xsub    |NN SV *const a|NN SV *const b
 s      |I32    |sortcv_stacked |NN SV *const a|NN SV *const b
@@ -2143,7 +2164,7 @@ Es        |regnode*|handle_regex_sets|NN RExC_state_t *pRExC_state \
                                |NN char * const oregcomp_parse
 Es     |void|parse_lparen_question_flags|NN RExC_state_t *pRExC_state
 Es     |regnode*|reg_node      |NN RExC_state_t *pRExC_state|U8 op
-Es     |UV     |reg_recode     |const char value|NN SV **encp
+Es     |UV     |reg_recode     |const U8 value|NN SV **encp
 Es     |regnode*|regpiece      |NN RExC_state_t *pRExC_state \
                                |NN I32 *flagp|U32 depth
 Es     |bool   |grok_bslash_N  |NN RExC_state_t *pRExC_state               \
@@ -2154,21 +2175,24 @@ Es      |bool   |grok_bslash_N  |NN RExC_state_t *pRExC_state               \
                                |const U32 depth
 Es     |void   |reginsert      |NN RExC_state_t *pRExC_state \
                                |U8 op|NN regnode *opnd|U32 depth
-Es     |void   |regtail        |NN RExC_state_t *pRExC_state \
-                               |NN regnode *p|NN const regnode *val|U32 depth
+Es     |void   |regtail        |NN RExC_state_t * pRExC_state              \
+                               |NN const regnode * const p                 \
+                               |NN const regnode * const val               \
+                               |const U32 depth
 Es     |SV *   |reg_scan_name  |NN RExC_state_t *pRExC_state \
                                |U32 flags
 Es     |U32    |join_exact     |NN RExC_state_t *pRExC_state \
                                |NN regnode *scan|NN UV *min_subtract  \
                                |NN bool *unfolded_multi_char          \
                                |U32 flags|NULLOK regnode *val|U32 depth
-EsRn   |char * |regpatws       |NN RExC_state_t *pRExC_state \
-                               |NN char *p|const bool recognize_comment
 Ei     |void   |alloc_maybe_populate_EXACT|NN RExC_state_t *pRExC_state \
                                |NN regnode *node|NN I32 *flagp|STRLEN len \
                                |UV code_point|bool downgradable
 Ein    |U8   |compute_EXACTish|NN RExC_state_t *pRExC_state
-Es     |char * |nextchar       |NN RExC_state_t *pRExC_state
+Es     |void   |nextchar       |NN RExC_state_t *pRExC_state
+Es     |void   |skip_to_be_ignored_text|NN RExC_state_t *pRExC_state  \
+                               |NN char ** p                       \
+                               |const bool force_to_xmod
 Ein    |char * |reg_skipcomment|NN RExC_state_t *pRExC_state|NN char * p
 Es     |void   |scan_commit    |NN const RExC_state_t *pRExC_state \
                                |NN struct scan_data_t *data        \
@@ -2259,7 +2283,7 @@ ERs       |I32    |regrepeat      |NN regexp *prog|NN char **startposp \
                                |NN regmatch_info *const reginfo \
                                |I32 max \
                                |int depth
-ERs    |I32    |regtry         |NN regmatch_info *reginfo|NN char **startposp
+ERs    |bool   |regtry         |NN regmatch_info *reginfo|NN char **startposp
 ERs    |bool   |reginclass     |NULLOK regexp * const prog  \
                                |NN const regnode * const n  \
                                |NN const U8 * const p       \
@@ -2280,7 +2304,19 @@ Es       |void   |to_utf8_substr |NN regexp * prog
 Es     |bool   |to_byte_substr |NN regexp * prog
 ERsn   |I32    |reg_check_named_buff_matched   |NN const regexp *rex \
                                                |NN const regnode *scan
-EsnR   |bool   |isGCB          |const GCB_enum before|const GCB_enum after
+EinR   |bool   |isGCB          |const GCB_enum before|const GCB_enum after
+EsR    |bool   |isLB           |LB_enum before                         \
+                               |LB_enum after                          \
+                               |NN const U8 * const strbeg             \
+                               |NN const U8 * const curpos             \
+                               |NN const U8 * const strend             \
+                               |const bool utf8_target
+EsR    |LB_enum|advance_one_LB |NN U8 ** curpos                                \
+                               |NN const U8 * const strend                     \
+                               |const bool utf8_target
+EsR    |LB_enum|backup_one_LB  |NN const U8 * const strbeg                     \
+                               |NN U8 ** curpos                                \
+                               |const bool utf8_target
 EsR    |bool   |isSB           |SB_enum before                         \
                                |SB_enum after                          \
                                |NN const U8 * const strbeg                     \
@@ -2302,7 +2338,8 @@ EsR       |bool   |isWB           |WB_enum previous                               \
                                |const bool utf8_target
 EsR    |WB_enum|advance_one_WB |NN U8 ** curpos                                \
                                |NN const U8 * const strend                     \
-                               |const bool utf8_target
+                               |const bool utf8_target                         \
+                               |const bool skip_Extend_Format
 EsR    |WB_enum|backup_one_WB  |NN WB_enum * previous                  \
                                |NN const U8 * const strbeg                     \
                                |NN U8 ** curpos                                \
@@ -2512,7 +2549,9 @@ sRM       |U8*    |swash_scan_list_line|NN U8* l|NN U8* const lend|NN UV* min \
                |NN const U8* const typestr
 #endif
 
+#ifndef PERL_NO_INLINE_FUNCTIONS
 AiMn   |void   |append_utf8_from_native_byte|const U8 byte|NN U8** dest
+#endif
 
 Apd    |void   |sv_setsv_flags |NN SV *dstr|NULLOK SV *sstr|const I32 flags
 Apd    |void   |sv_catpvn_flags|NN SV *const dstr|NN const char *sstr|const STRLEN len \
@@ -2606,8 +2645,6 @@ Apd       |PADOFFSET|pad_findmy_pv|NN const char* name|U32 flags
 Apd    |PADOFFSET|pad_findmy_sv|NN SV* name|U32 flags
 ApdD   |PADOFFSET|find_rundefsvoffset  |
 Apd    |SV*    |find_rundefsv  |
-: Used in pp.c
-p      |SV*    |find_rundefsv2 |NN CV *cv|U32 seq
 #if defined(PERL_IN_PAD_C)
 sd     |PADOFFSET|pad_findlex  |NN const char *namepv|STRLEN namelen|U32 flags \
                                |NN const CV* cv|U32 seq|int warn \