This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
lib/locale_threads.t: Add safe thread test
[perl5.git] / embed.fnc
index 6af7e76..73139f3 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -521,7 +521,7 @@ p   |Off_t  |do_sysseek     |NN GV* gv|Off_t pos|int whence
 : Defined in doio.c, used only in pp_sys.c
 pR     |Off_t  |do_tell        |NN GV* gv
 : Defined in doop.c, used only in pp.c
-p      |I32    |do_trans       |NN SV* sv
+p      |Size_t |do_trans       |NN SV* sv
 : Used in my.c and pp.c
 p      |UV     |do_vecget      |NN SV* sv|STRLEN offset|int size
 : Defined in doop.c, used only in mg.c (with /* XXX slurp this routine */)
@@ -806,11 +806,12 @@ AndmoR    |bool   |is_utf8_invariant_string|NN const U8* const s              \
 AnidR  |bool   |is_utf8_invariant_string_loc|NN const U8* const s          \
                |STRLEN len                                                 \
                |NULLOK const U8 ** ep
+AniR   |unsigned int|_variant_byte_number|PERL_UINTMAX_T word
 #if defined(PERL_CORE) || defined(PERL_EXT)
 EinR   |Size_t |variant_under_utf8_count|NN const U8* const s              \
                |NN const U8* const e
 #endif
-AmnpdRP        |bool   |is_ascii_string|NN const U8* const s|const STRLEN len
+AmnpdRP        |bool   |is_ascii_string|NN const U8* const s|STRLEN len
 AmnpdRP        |bool   |is_invariant_string|NN const U8* const s|STRLEN len
 #if defined(PERL_CORE) || defined (PERL_EXT)
 EXnidR |bool   |is_utf8_non_invariant_string|NN const U8* const s          \
@@ -895,6 +896,11 @@ ADMpR      |bool   |is_utf8_punct  |NN const U8 *p
 ADMpR  |bool   |is_utf8_xdigit |NN const U8 *p
 AMpR   |bool   |_is_utf8_mark  |NN const U8 *p
 ADMpR  |bool   |is_utf8_mark   |NN const U8 *p
+#if defined(PERL_CORE) || defined(PERL_EXT)
+EXdpR  |bool   |isSCRIPT_RUN   |NN const U8 *s|NN const U8 *send   \
+                               |const bool utf8_target             \
+                               |NULLOK SCX_enum * ret_script
+#endif
 : Used in perly.y
 p      |OP*    |jmaybe         |NN OP *o
 : Used in pp.c 
@@ -1129,7 +1135,7 @@ Apd       |CV*    |newCONSTSUB_flags|NULLOK HV* stash \
                                  |U32 flags|NULLOK SV* sv
 Ap     |void   |newFORM        |I32 floor|NULLOK OP* o|NULLOK OP* block
 ApdR   |OP*    |newFOROP       |I32 flags|NULLOK OP* sv|NN OP* expr|NULLOK OP* block|NULLOK OP* cont
-ApdR   |OP*    |newGIVENOP     |NN OP* topic|NN OP* block|PADOFFSET defsv_off
+ApdR   |OP*    |newGIVENOP     |NN OP* cond|NN OP* block|PADOFFSET defsv_off
 ApdR   |OP*    |newLOGOP       |I32 optype|I32 flags|NN OP *first|NN OP *other
 pM     |LOGOP* |alloc_LOGOP    |I32 type|NULLOK OP *first|NULLOK OP *other
 ApdR   |OP*    |newLOOPEX      |I32 type|NN OP* label
@@ -1198,7 +1204,7 @@ ApdR      |SV*    |newSV_type     |const svtype type
 ApdR   |OP*    |newUNOP        |I32 type|I32 flags|NULLOK OP* first
 ApdR   |OP*    |newUNOP_AUX    |I32 type|I32 flags|NULLOK OP* first \
                                |NULLOK UNOP_AUX_item *aux
-ApdR   |OP*    |newWHERESOOP   |NN OP* cond|NN OP* block
+ApdR   |OP*    |newWHENOP      |NULLOK OP* cond|NN OP* block
 ApdR   |OP*    |newWHILEOP     |I32 flags|I32 debuggable|NULLOK LOOP* loop \
                                |NULLOK OP* expr|NULLOK OP* block|NULLOK OP* cont \
                                |I32 has_my
@@ -1290,7 +1296,7 @@ ApdO      |AV*    |get_av         |NN const char *name|I32 flags
 ApdO   |HV*    |get_hv         |NN const char *name|I32 flags
 ApdO   |CV*    |get_cv         |NN const char* name|I32 flags
 Apd    |CV*    |get_cvn_flags  |NN const char* name|STRLEN len|I32 flags
-EXnpo  |char*  |setlocale      |int category|NULLOK const char* locale
+Ando   |const char*|Perl_setlocale|const int category|NULLOK const char* locale
 #if defined(HAS_NL_LANGINFO) && defined(PERL_LANGINFO_H)
 Ando   |const char*|Perl_langinfo|const nl_item item
 #else
@@ -1300,11 +1306,12 @@ ApOM    |int    |init_i18nl10n  |int printwarn
 ApOM   |int    |init_i18nl14n  |int printwarn
 p      |char*  |my_strerror    |const int errnum
 Xpn    |void   |_warn_problematic_locale
-p      |void   |new_numeric    |NULLOK const char* newcoll
 Xp     |void   |set_numeric_underlying
 Xp     |void   |set_numeric_standard
 Xp     |bool   |_is_in_locale_category|const bool compiling|const int category
 Apd    |void   |sync_locale
+ApMn   |void   |thread_locale_init
+ApMn   |void   |thread_locale_term
 ApdO   |void   |require_pv     |NN const char* pv
 Apd    |void   |pack_cat       |NN SV *cat|NN const char *pat|NN const char *patend \
                                |NN SV **beglist|NN SV **endlist|NN SV ***next_in_list|U32 flags
@@ -1855,18 +1862,26 @@ Adop    |UV     |utf8n_to_uvchr |NN const U8 *s                             \
                                |STRLEN curlen                              \
                                |NULLOK STRLEN *retlen                      \
                                |const U32 flags
-Ad   |UV     |utf8n_to_uvchr_error|NN const U8 *s                        \
+Adop   |UV     |utf8n_to_uvchr_error|NN const U8 *s                        \
                                |STRLEN curlen                              \
                                |NULLOK STRLEN *retlen                      \
                                |const U32 flags                            \
                                |NULLOK U32 * errors
+AMdp   |UV     |utf8n_to_uvchr_msgs|NN const U8 *s                         \
+                               |STRLEN curlen                              \
+                               |NULLOK STRLEN *retlen                      \
+                               |const U32 flags                            \
+                               |NULLOK U32 * errors                        \
+                               |NULLOK AV ** msgs
 AipnR  |UV     |valid_utf8_to_uvchr    |NN const U8 *s|NULLOK STRLEN *retlen
 Ap     |UV     |utf8n_to_uvuni|NN const U8 *s|STRLEN curlen|NULLOK STRLEN *retlen|U32 flags
 
 Adm    |U8*    |uvchr_to_utf8  |NN U8 *d|UV uv
 Ap     |U8*    |uvuni_to_utf8  |NN U8 *d|UV uv
 Adm    |U8*    |uvchr_to_utf8_flags    |NN U8 *d|UV uv|UV flags
-Apd    |U8*    |uvoffuni_to_utf8_flags |NN U8 *d|UV uv|const UV flags
+AdmM   |U8*    |uvchr_to_utf8_flags_msgs|NN U8 *d|UV uv|UV flags|NULLOK HV ** msgs
+Apod   |U8*    |uvoffuni_to_utf8_flags |NN U8 *d|UV uv|const UV flags
+ApM    |U8*    |uvoffuni_to_utf8_flags_msgs|NN U8 *d|UV uv|const UV flags|NULLOK HV** msgs
 Ap     |U8*    |uvuni_to_utf8_flags    |NN U8 *d|UV uv|UV flags
 Apd    |char*  |pv_uni_display |NN SV *dsv|NN const U8 *spv|STRLEN len|STRLEN pvlim|UV flags
 ApdR   |char*  |sv_uni_display |NN SV *dsv|NN SV *ssv|STRLEN pvlim|UV flags
@@ -2086,12 +2101,12 @@ Adp     |int    |nothreadhook
 p      |void   |init_constants
 
 #if defined(PERL_IN_DOOP_C)
-sR     |I32    |do_trans_simple        |NN SV * const sv
-sR     |I32    |do_trans_count         |NN SV * const sv
-sR     |I32    |do_trans_complex       |NN SV * const sv
-sR     |I32    |do_trans_simple_utf8   |NN SV * const sv
-sR     |I32    |do_trans_count_utf8    |NN SV * const sv
-sR     |I32    |do_trans_complex_utf8  |NN SV * const sv
+sR     |Size_t |do_trans_simple        |NN SV * const sv
+sR     |Size_t |do_trans_count         |NN SV * const sv
+sR     |Size_t |do_trans_complex       |NN SV * const sv
+sR     |Size_t |do_trans_simple_utf8   |NN SV * const sv
+sR     |Size_t |do_trans_count_utf8    |NN SV * const sv
+sR     |Size_t |do_trans_complex_utf8  |NN SV * const sv
 #endif
 
 #if defined(PERL_IN_GV_C)
@@ -2172,6 +2187,11 @@ s        |void   |no_bareword_allowed|NN OP *o
 sR     |OP*    |no_fh_allowed|NN OP *o
 sR     |OP*    |too_few_arguments_pv|NN OP *o|NN const char* name|U32 flags
 s      |OP*    |too_many_arguments_pv|NN OP *o|NN const char* name|U32 flags
+s      |bool   |looks_like_bool|NN const OP* o
+s      |OP*    |newGIVWHENOP   |NULLOK OP* cond|NN OP *block \
+                               |I32 enter_opcode|I32 leave_opcode \
+                               |PADOFFSET entertarg
+s      |OP*    |ref_array_or_hash|NULLOK OP* cond
 s      |bool   |process_special_blocks |I32 floor \
                                        |NN const char *const fullname\
                                        |NN GV *const gv|NN CV *const cv
@@ -2259,10 +2279,11 @@ sR      |OP*    |dofindlabel    |NN OP *o|NN const char *label|STRLEN len \
 s      |MAGIC *|doparseform    |NN SV *sv
 snR    |bool   |num_overflow   |NV value|I32 fldsize|I32 frcsize
 sR     |I32    |dopoptoeval    |I32 startingblock
+sR     |I32    |dopoptogivenfor|I32 startingblock
 sR     |I32    |dopoptolabel   |NN const char *label|STRLEN len|U32 flags
 sR     |I32    |dopoptoloop    |I32 startingblock
 sR     |I32    |dopoptosub_at  |NN const PERL_CONTEXT* cxstk|I32 startingblock
-sR     |I32    |dopoptowhereso |I32 startingblock
+sR     |I32    |dopoptowhen    |I32 startingblock
 s      |void   |save_lines     |NULLOK AV *array|NN SV *sv
 s      |bool   |doeval_compile |U8 gimme \
                                |NULLOK CV* outside|U32 seq|NULLOK HV* hh
@@ -2272,6 +2293,11 @@ sR       |PerlIO *|doopen_pm     |NN SV *name
 #endif
 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
+s      |void   |destroy_matcher|NN PMOP* matcher
+s      |OP*    |do_smartmatch  |NULLOK HV* seen_this \
+                               |NULLOK HV* seen_other|const bool copied
 #endif
 
 #if defined(PERL_IN_PP_HOT_C)
@@ -2437,6 +2463,7 @@ Es        |SSize_t|study_chunk    |NN RExC_state_t *pRExC_state \
                                 |I32 stopparen|U32 recursed_depth \
                                |NULLOK regnode_ssc *and_withp \
                                |U32 flags|U32 depth
+EsR    |SV *   |get_ANYOFM_contents|NN const regnode * n
 EsRn   |U32    |add_data       |NN RExC_state_t* const pRExC_state \
                                |NN const char* const s|const U32 n
 rs     |void   |re_croak2      |bool utf8|NN const char* pat1|NN const char* pat2|...
@@ -2469,7 +2496,7 @@ Es        |const regnode*|dumpuntil|NN const regexp *r|NN const regnode *start \
                                |NN SV* sv|I32 indent|U32 depth
 Es     |void   |put_code_point |NN SV* sv|UV c
 Es     |bool   |put_charclass_bitmap_innards|NN SV* sv             \
-                               |NN char* bitmap                    \
+                               |NULLOK char* bitmap                \
                                |NULLOK SV* nonbitmap_invlist       \
                                |NULLOK SV* only_utf8_locale_invlist\
                                |NULLOK const regnode * const node  \
@@ -2510,6 +2537,14 @@ ERp      |bool   |_is_grapheme   |NN const U8 * strbeg|NN const U8 * s|NN const U8 *stren
 
 #if defined(PERL_IN_REGEXEC_C)
 ERs    |bool   |isFOO_utf8_lc  |const U8 classnum|NN const U8* character
+ERns   |char *|find_next_ascii|NN char* s|NN const char * send|const bool is_utf8
+ERns   |char *|find_next_non_ascii|NN char* s|NN const char * send|const bool is_utf8
+ERns   |char * |find_next_masked|NN char * s                           \
+                                |NN const char * send                  \
+                                |const U8 byte|const U8 mask
+ERns   |char *|find_span_end   |NN char* s|NN const char * send|const char span_byte
+ERns   |U8 *|find_span_end_mask|NN U8 * s|NN const U8 * send   \
+                               |const U8 span_byte|const U8 mask
 ERs    |SSize_t|regmatch       |NN regmatch_info *reginfo|NN char *startpos|NN regnode *prog
 WERs   |I32    |regrepeat      |NN regexp *prog|NN char **startposp \
                                |NN const regnode *p \
@@ -2709,7 +2744,7 @@ s |void   |incline        |NN const char *s|NN const char *end
 s      |int    |intuit_method  |NN char *s|NULLOK SV *ioname|NULLOK CV *cv
 s      |int    |intuit_more    |NN char *s|NN char *e
 s      |I32    |lop            |I32 f|U8 x|NN char *s
-rs     |void   |missingterm    |NULLOK char *s|const STRLEN len
+rs     |void   |missingterm    |NULLOK char *s|STRLEN len
 s      |void   |no_op          |NN const char *const what|NULLOK char *s
 s      |int    |pending_ident
 sR     |I32    |sublex_done
@@ -2745,6 +2780,9 @@ s |bool   |isa_lookup     |NN HV *stash|NN const char * const name \
 #endif
 
 #if defined(PERL_IN_LOCALE_C)
+sn     |const char*|category_name |const int category
+s      |const char*|switch_category_locale_to_template|const int switch_category|const int template_category|NULLOK const char * template_locale
+s      |void   |restore_switched_locale|const int category|NULLOK const char * const original_locale
 #  ifdef HAS_NL_LANGINFO
 sn     |const char*|my_nl_langinfo|const nl_item item|bool toggle
 #  else
@@ -2759,6 +2797,13 @@ s        |char*  |stdize_locale  |NN char* locs
 s      |void   |new_collate    |NULLOK const char* newcoll
 s      |void   |new_ctype      |NN const char* newctype
 s      |void   |set_numeric_radix|const bool use_locale
+s      |void   |new_numeric    |NULLOK const char* newnum
+#    ifdef USE_POSIX_2008_LOCALE
+sn     |const char*|emulate_setlocale|const int category               \
+                                   |NULLOK const char* locale          \
+                                   |unsigned int index                 \
+                                   |const bool is_index_valid
+#    endif
 #    ifdef WIN32
 s      |char*  |win32_setlocale|int category|NULLOK const char* locale
 #    endif
@@ -2812,6 +2857,9 @@ sn        |NV|mulexp10    |NV value|I32 exponent
 #endif
 
 #if defined(PERL_IN_UTF8_C)
+sR     |HV *   |new_msg_hv |NN const char * const message                  \
+                           |U32 categories                                 \
+                           |U32 flag
 sRM    |UV     |check_locale_boundary_crossing                             \
                |NN const U8* const p                                       \
                |const UV result                                            \
@@ -3190,10 +3238,11 @@ AiM     |void   |cx_popeval      |NN PERL_CONTEXT *cx
 AiM    |void   |cx_pushloop_plain|NN PERL_CONTEXT *cx
 AiM    |void   |cx_pushloop_for |NN PERL_CONTEXT *cx \
                                 |NN void *itervarp|NULLOK SV *itersave
-AiM    |void   |cx_pushloop_given    |NN PERL_CONTEXT *cx|NULLOK SV *orig_defsv
 AiM    |void   |cx_poploop      |NN PERL_CONTEXT *cx
-AiM    |void   |cx_pushwhereso  |NN PERL_CONTEXT *cx
-AiM    |void   |cx_popwhereso   |NN PERL_CONTEXT *cx
+AiM    |void   |cx_pushwhen     |NN PERL_CONTEXT *cx
+AiM    |void   |cx_popwhen      |NN PERL_CONTEXT *cx
+AiM    |void   |cx_pushgiven    |NN PERL_CONTEXT *cx|NULLOK SV *orig_defsv
+AiM    |void   |cx_popgiven     |NN PERL_CONTEXT *cx
 #endif
 
 #ifdef USE_DTRACE