This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make set-magic handle vstrings properly
[perl5.git] / embed.fnc
index 43b2e7b..af6119b 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -427,6 +427,7 @@ p   |void   |dump_sub_perl  |NN const GV* gv|bool justperl
 Apd    |void   |fbm_compile    |NN SV* sv|U32 flags
 ApdR   |char*  |fbm_instr      |NN unsigned char* big|NN unsigned char* bigend \
                                |NN SV* littlestr|U32 flags
+p      |CV *   |find_lexical_cv|PADOFFSET off
 : Defined in util.c, used only in perl.c
 p      |char*  |find_script    |NN const char *scriptname|bool dosearch \
                                |NULLOK const char *const *const search_ext|I32 flags
@@ -530,7 +531,7 @@ Ap  |void*  |hv_common      |NULLOK HV *hv|NULLOK SV *keysv \
 Ap     |void*  |hv_common_key_len|NULLOK HV *hv|NN const char *key \
                                |I32 klen_i32|const int action|NULLOK SV *val \
                                |const U32 hash
-Apod   |STRLEN |hv_fill        |NN HV const *const hv
+Apod   |STRLEN |hv_fill        |NN HV *const hv
 Ap     |void   |hv_free_ent    |NN HV *hv|NULLOK HE *entry
 Apd    |I32    |hv_iterinit    |NN HV *hv
 ApdR   |char*  |hv_iterkey     |NN HE* entry|NN I32* retlen
@@ -818,7 +819,7 @@ p   |int    |magic_set_all_env|NN SV* sv|NN MAGIC* mg
 p      |U32    |magic_sizepack |NN SV* sv|NN MAGIC* mg
 p      |int    |magic_wipepack |NN SV* sv|NN MAGIC* mg
 pod    |SV*    |magic_methcall |NN SV *sv|NN const MAGIC *mg \
-                               |NN const char *meth|U32 flags \
+                               |NN SV *meth|U32 flags \
                                |U32 argc|...
 Ap     |void   |markstack_grow
 #if defined(USE_LOCALE_COLLATE)
@@ -1106,8 +1107,12 @@ p        |REGEXP*|re_op_compile  |NULLOK SV ** const patternp \
                                |NULLOK bool *is_bare_re \
                                |U32 rx_flags|U32 pm_flags
 Ap     |REGEXP*|re_compile     |NN SV * const pattern|U32 orig_rx_flags
-Ap     |char*  |re_intuit_start|NN REGEXP * const rx|NULLOK SV* sv|NN char* strpos \
-                               |NN char* strend|const U32 flags \
+Ap     |char*  |re_intuit_start|NN REGEXP * const rx \
+                               |NULLOK SV* sv \
+                               |NN const char* const strbeg \
+                               |NN char* strpos \
+                               |NN char* strend \
+                               |const U32 flags \
                                |NULLOK re_scream_pos_data *data
 Ap     |SV*    |re_intuit_string|NN REGEXP  *const r
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_TOKE_C)
@@ -1716,14 +1721,12 @@ Ap      |void   |ptr_table_store|NN PTR_TBL_t *const tbl|NULLOK const void *const oldsv
 Ap     |void   |ptr_table_split|NN PTR_TBL_t *const tbl
 ApD    |void   |ptr_table_clear|NULLOK PTR_TBL_t *const tbl
 Ap     |void   |ptr_table_free|NULLOK PTR_TBL_t *const tbl
-#if defined(USE_ITHREADS)
-#  if defined(HAVE_INTERP_INTERN)
-Ap     |void   |sys_intern_dup |NN struct interp_intern* src|NN struct interp_intern* dst
-#  endif
-#endif
 #if defined(HAVE_INTERP_INTERN)
 Ap     |void   |sys_intern_clear
 Ap     |void   |sys_intern_init
+#  if defined(USE_ITHREADS)
+Ap     |void   |sys_intern_dup |NN struct interp_intern* src|NN struct interp_intern* dst
+#  endif
 #endif
 
 AopP   |const XOP *    |custom_op_xop  |NN const OP *o
@@ -1773,7 +1776,7 @@ sn        |void   |hv_magic_check |NN HV *hv|NN bool *needs_copy|NN bool *needs_store
 s      |void   |unshare_hek_or_pvn|NULLOK const HEK* hek|NULLOK const char* str|I32 len|U32 hash
 sR     |HEK*   |share_hek_flags|NN const char *str|I32 len|U32 hash|int flags
 rs     |void   |hv_notallowed  |int flags|NN const char *key|I32 klen|NN const char *msg
-sn      |U32|ptr_hash|PTRV u
+in     |U32|ptr_hash|PTRV u
 s      |struct xpvhv_aux*|hv_auxinit|NN HV *hv
 sM     |SV*    |hv_delete_common|NULLOK HV *hv|NULLOK SV *keysv \
                |NULLOK const char *key|STRLEN klen|int k_flags|I32 d_flags \
@@ -1782,10 +1785,10 @@ sM      |void   |clear_placeholders     |NN HV *hv|U32 items
 #endif
 
 #if defined(PERL_IN_MG_C)
-s      |void   |save_magic     |I32 mgs_ix|NN SV *sv
--s     |int    |magic_methpack |NN SV *sv|NN const MAGIC *mg|NN const char *meth
+s      |void   |save_magic_flags|I32 mgs_ix|NN SV *sv|U32 flags
+-s     |int    |magic_methpack |NN SV *sv|NN const MAGIC *mg|NN SV *meth
 s      |SV*    |magic_methcall1|NN SV *sv|NN const MAGIC *mg \
-                               |NN const char *meth|U32 flags \
+                               |NN SV *meth|U32 flags \
                                |int n|NULLOK SV *val
 s      |void   |restore_magic  |NULLOK const void *p
 s      |void   |unwind_handler_stack|NULLOK const void *p
@@ -1811,7 +1814,7 @@ s |OP *   |dup_attrlist   |NN OP *o
 s      |void   |apply_attrs    |NN HV *stash|NN SV *target|NULLOK OP *attrs
 s      |void   |apply_attrs_my |NN HV *stash|NN OP *target|NULLOK OP *attrs|NN OP **imopsp
 s      |void   |bad_type_pv    |I32 n|NN const char *t|NN const char *name|U32 flags|NN const OP *kid
-s      |void   |bad_type_sv    |I32 n|NN const char *t|NN SV *namesv|U32 flags|NN const OP *kid
+s      |void   |bad_type_gv    |I32 n|NN const char *t|NN GV *gv|U32 flags|NN const OP *kid
 s      |void   |no_bareword_allowed|NN OP *o
 sR     |OP*    |no_fh_allowed|NN OP *o
 sR     |OP*    |too_few_arguments_sv|NN OP *o|NN SV* namesv|U32 flags
@@ -1921,7 +1924,7 @@ sR        |PerlIO *|check_type_and_open|NN SV *name
 sR     |PerlIO *|doopen_pm     |NN SV *name
 #endif
 s      |SV **  |adjust_stack_on_leave|NN SV **newsp|NN SV **sp|NN SV **mark|I32 gimme|U32 flags
-sRn    |bool   |path_is_absolute|NN const char *name
+iRn    |bool   |path_is_searchable|NN const char *name
 sR     |I32    |run_user_filter|int idx|NN SV *buf_sv|int maxlen
 sR     |PMOP*  |make_matcher   |NN REGEXP* re
 sR     |bool   |matcher_matches_sv|NN PMOP* matcher|NN SV* sv
@@ -1955,7 +1958,7 @@ sR        |int    |dooneliner     |NN const char *cmd|NN const char *filename
 #  endif
 s      |SV *   |space_join_names_mortal|NN char *const *array
 #endif
-p      |OP *   |tied_method|NN const char *const methname|NN SV **sp \
+p      |OP *   |tied_method|NN SV *methname|NN SV **sp \
                                |NN SV *const sv|NN const MAGIC *const mg \
                                |const U32 flags|U32 argc|...
 
@@ -2042,6 +2045,7 @@ Es        |void   |make_trie_failtable    |NN struct RExC_state_t *pRExC_state \
                                 |NN regnode *source|NN regnode *stclass \
                                |U32 depth
 #  ifdef DEBUGGING
+Es        |void        |regdump_intflags|NULLOK const char *lead| const U32 flags
 Es     |void   |regdump_extflags|NULLOK const char *lead| const U32 flags
 Es     |const regnode*|dumpuntil|NN const regexp *r|NN const regnode *start \
                                |NN const regnode *node \
@@ -2068,8 +2072,10 @@ ERs      |bool   |isFOO_lc       |const U8 classnum|const U8 character
 ERs    |bool   |isFOO_utf8_lc  |const U8 classnum|NN const U8* character
 ERs    |I32    |regmatch       |NN regmatch_info *reginfo|NN char *startpos|NN regnode *prog
 ERs    |I32    |regrepeat      |NN regexp *prog|NN char **startposp \
-                               |NN const regnode *p|I32 max|int depth \
-                               |bool is_utf8_pat
+                               |NN const regnode *p \
+                               |NN regmatch_info *const reginfo \
+                               |I32 max \
+                               |int depth
 ERs    |I32    |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\
                                |bool const utf8_target
@@ -2088,8 +2094,7 @@ ERsn      |U8*    |reghop4        |NN U8 *s|I32 off|NN const U8 *llim \
 ERsn   |U8*    |reghopmaybe3   |NN U8 *s|I32 off|NN const U8 *lim
 ERs    |char*  |find_byclass   |NN regexp * prog|NN const regnode *c \
                                |NN char *s|NN const char *strend \
-                               |NULLOK regmatch_info *reginfo \
-                               |bool is_utf_pat
+                               |NULLOK regmatch_info *reginfo
 Es     |void   |to_utf8_substr |NN regexp * prog
 Es     |bool   |to_byte_substr |NN regexp * prog
 ERs    |I32    |reg_check_named_buff_matched   |NN const regexp *rex \
@@ -2186,7 +2191,7 @@ s |void   |force_next     |I32 type
 s      |char*  |force_version  |NN char *s|int guessing
 s      |char*  |force_strict_version   |NN char *s
 s      |char*  |force_word     |NN char *start|int token|int check_keyword \
-                               |int allow_pack|int allow_tick
+                               |int allow_pack
 s      |SV*    |tokeq          |NN SV *sv
 s      |void   |readpipe_override|
 sR     |char*  |scan_const     |NN char *start
@@ -2248,6 +2253,7 @@ s |int    |tokereport     |I32 rv|NN const YYSTYPE* lvalp
 s      |void   |printbuf       |NN const char *const fmt|NN const char *const s
 #  endif
 #endif
+EXMp   |bool   |validate_proto |NN SV *name|NULLOK SV *proto|bool warn
 
 #if defined(PERL_IN_UNIVERSAL_C)
 s      |bool|isa_lookup        |NN HV *stash|NN const char * const name \
@@ -2257,6 +2263,7 @@ s |bool|isa_lookup        |NN HV *stash|NN const char * const name \
 #if defined(PERL_IN_LOCALE_C)
 #if defined(USE_LOCALE_NUMERIC) || defined(USE_LOCALE_COLLATE)
 s      |char*  |stdize_locale  |NN char* locs
+s      |bool   |is_cur_LC_category_utf8|int category
 #endif
 #endif
 
@@ -2459,10 +2466,6 @@ sMd      |SV*    |find_uninit_var|NULLOK const OP *const obase \
                |NULLOK const SV *const uninit_sv|bool top
 #endif
 
-: I think that these are only used by the above, which are macros, and in turn
-: currently they are only used in pp_pack.c, but this is in util.c
-np     |void   |my_swabn       |NN void* ptr|int n
-
 Ap     |GV*    |gv_fetchpvn_flags|NN const char* name|STRLEN len|I32 flags|const svtype sv_type
 Ap     |GV*    |gv_fetchsv|NN SV *name|I32 flags|const svtype sv_type