This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Create fcn for lossless conversion of NV to IV
[perl5.git] / embed.fnc
index d311ca7..259affd 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -1110,6 +1110,7 @@ s |void   |move_proto_attr|NN OP **proto|NN OP **attrs \
 p      |int    |mode_from_discipline|NULLOK const char* s|STRLEN len
 Ap     |const char*    |moreswitches   |NN const char* s
 Ap     |NV     |my_atof        |NN const char *s
+AnpR   |NV     |my_strtod      |NN const char * const s|NULLOK char ** e
 Apr    |void   |my_exit        |U32 status
 Apr    |void   |my_failure_exit
 Ap     |I32    |my_fflush_all
@@ -1209,7 +1210,9 @@ ApdR      |SV*    |newSVpv_share  |NULLOK const char* s|U32 hash
 AfpdR  |SV*    |newSVpvf       |NN const char *const pat|...
 ApR    |SV*    |vnewSVpvf      |NN const char *const pat|NULLOK va_list *const args
 Apd    |SV*    |newSVrv        |NN SV *const rv|NULLOK const char *const classname
-ApdR   |SV*    |newSVsv        |NULLOK SV *const old
+ApmbdR |SV*    |newSVsv        |NULLOK SV *const old
+ApmdR  |SV*    |newSVsv_nomg   |NULLOK SV *const old
+ApR    |SV*    |newSVsv_flags  |NULLOK SV *const old|I32 flags
 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 \
@@ -1343,9 +1346,6 @@ Apmb      |OP*    |ref            |NULLOK OP* o|I32 type
 s      |OP*    |refkids        |NULLOK OP* o|I32 type
 #endif
 Ap     |void   |regdump        |NN const regexp* r
-ApM    |SV*    |regclass_swash |NULLOK const regexp *prog \
-                               |NN const struct regnode *node|bool doinit \
-                               |NULLOK SV **listsvp|NULLOK SV **altsvp
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_PERL_C) || defined(PERL_IN_UTF8_C)
 EXpR   |SV*    |_new_invlist_C_array|NN const UV* const list
 EXMp   |bool   |_invlistEQ     |NN SV* const a|NN SV* const b|const bool complement_b
@@ -1735,27 +1735,19 @@ EXpM    |void   |_invlist_union_maybe_complement_2nd        \
 EXmM   |void   |_invlist_subtract|NN SV* const a|NN SV* const b|NN SV** result
 EXpM   |void   |_invlist_invert|NN SV* const invlist
 EXMpR  |SV*    |_new_invlist   |IV initial_size
-EXMpR  |SV*    |_swash_to_invlist      |NN SV* const swash
 EXMpR  |SV*    |_add_range_to_invlist  |NULLOK SV* invlist|UV start|UV end
 EXMpR  |SV*    |_setup_canned_invlist|const STRLEN size|const UV element0|NN UV** other_elements_ptr
-EXMpn  |void   |_invlist_populate_swatch   |NN SV* const invlist|const UV start|const UV end|NN U8* swatch
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_SV_C)
 EMpX   |SV*    |invlist_clone  |NN SV* const invlist|NULLOK SV* newlist
 #endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_TOKE_C)
-EXp    |SV*    |_core_swash_init|NN const char* pkg|NN const char* name \
-               |NN SV* listsv|I32 minbits|I32 none \
-               |NULLOK SV* invlist|NULLOK U8* const flags_p
-#endif
-#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UTF8_C)
+#if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C) || defined(PERL_IN_TOKE_C) || defined(PERL_IN_UTF8_C) || defined(PERL_IN_PP_C)
 EiMRn  |UV*    |invlist_array  |NN SV* const invlist
-EiMRn  |bool   |is_invlist     |NN SV* const invlist
+EiMRn  |bool   |is_invlist     |NULLOK SV* const invlist
 EiMRn  |bool*  |get_invlist_offset_addr|NN SV* invlist
 EiMRn  |UV     |_invlist_len   |NN SV* const invlist
 EMiRn  |bool   |_invlist_contains_cp|NN SV* const invlist|const UV cp
 EXpMRn |SSize_t|_invlist_search        |NN SV* const invlist|const UV cp
-EXMpR  |SV*    |_get_swash_invlist|NN SV* const swash
 #endif
 #if defined(PERL_IN_REGCOMP_C) || defined(PERL_IN_REGEXEC_C)
 EXpM   |SV*    |_get_regclass_nonbitmap_data                              \
@@ -1811,6 +1803,9 @@ s |UV     |_to_utf8_case  |const UV uv1                                   \
                                |NULLOK const unsigned int * const * const aux_tables   \
                                |NULLOK const U8 * const aux_table_lengths      \
                                |NN const char * const normal
+s      |UV     |turkic_fc      |NN const U8 * const p |NN const U8 * const e|NN U8* ustrp|NN STRLEN *lenp
+s      |UV     |turkic_lc      |NN const U8 * const p0|NN const U8 * const e|NN U8* ustrp|NN STRLEN *lenp
+s      |UV     |turkic_uc      |NN const U8 * const p |NN const U8 * const e|NN U8* ustrp|NN STRLEN *lenp
 #endif
 ApbmdD |UV     |to_utf8_lower  |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp
 AMp    |UV     |_to_utf8_lower_flags|NN const U8 *p|NULLOK const U8* e         \
@@ -2277,6 +2272,7 @@ sR        |SV*    |refto          |NN SV* sv
 : Used in pp_hot.c
 pRxo   |GV*    |softref2xv     |NN SV *const sv|NN const char *const what \
                                |const svtype type|NN SV ***spp
+inR    |bool   |lossless_NV_to_IV|const NV nv|NN IV * ivp
 #endif
 
 #if defined(PERL_IN_PP_PACK_C)
@@ -2382,10 +2378,8 @@ Es       |regnode_offset|regbranch       |NN RExC_state_t *pRExC_state \
 Es     |void    |set_ANYOF_arg |NN RExC_state_t* const pRExC_state \
                                |NN regnode* const node                    \
                                |NULLOK SV* const cp_list                  \
-                               |NULLOK SV* const runtime_defns            \
-                               |NULLOK SV* const only_utf8_locale_list    \
-                               |NULLOK SV* const swash                    \
-                               |const bool has_user_defined_property
+                               |NULLOK SV* const runtime_defns            \
+                               |NULLOK SV* const only_utf8_locale_list
 Es     |void   |output_posix_warnings                                      \
                                |NN RExC_state_t *pRExC_state               \
                                |NN AV* posix_warnings
@@ -2432,7 +2426,7 @@ Es        |void   |reginsert      |NN RExC_state_t *pRExC_state \
                                |const U8 op                                \
                                |const regnode_offset operand               \
                                |const U32 depth
-Es     |void   |regtail        |NN RExC_state_t * pRExC_state              \
+Es     |bool   |regtail        |NN RExC_state_t * pRExC_state              \
                                |NN const regnode_offset p                  \
                                |NN const regnode_offset val                \
                                |const U32 depth
@@ -2510,10 +2504,25 @@ EnsR    |int    |edit_distance  |NN const UV *src                   \
                                |const STRLEN x                     \
                                |const STRLEN y                     \
                                |const SSize_t maxDistance
-EXp    |SV *   |parse_uniprop_string|NN const char * const name           \
-                                    |const Size_t name_len                \
-                                    |const bool to_fold                   \
-                                    |NN bool * invert
+EpX    |SV *   |parse_uniprop_string|NN const char * const name            \
+                                    |const Size_t name_len                 \
+                                    |const bool is_utf8                    \
+                                    |const bool to_fold                    \
+                                    |const bool runtime                    \
+                                    |const bool deferrable                 \
+                                    |NN bool * user_defined_ptr            \
+                                    |NN SV * msg                           \
+                                    |const STRLEN level
+EXp    |SV *   |handle_user_defined_property|NN const char * name          \
+                                            |const STRLEN name_len         \
+                                            |const bool is_utf8            \
+                                            |const bool to_fold            \
+                                            |const bool runtime            \
+                                            |const bool deferrable         \
+                                            |NN SV* contents               \
+                                            |NN bool *user_defined_ptr     \
+                                            |NN SV * msg                   \
+                                            |const STRLEN level
 #  ifdef DEBUGGING
 Ep     |int    |re_indentf     |NN const char *fmt|U32 depth|...
 Es     |void        |regdump_intflags|NULLOK const char *lead| const U32 flags
@@ -2551,7 +2560,7 @@ Es        |void   |dump_trie_interim_list|NN const struct _reg_trie_data *trie\
 Es     |void   |dump_trie_interim_table|NN const struct _reg_trie_data *trie\
                                |NULLOK HV* widecharmap|NN AV *revcharmap\
                                |U32 next_alloc|U32 depth
-Es     |U8     |regtail_study  |NN RExC_state_t *pRExC_state \
+Es     |bool   |regtail_study  |NN RExC_state_t *pRExC_state \
                                |NN regnode_offset p|NN const regnode_offset val|U32 depth
 #  endif
 #endif
@@ -2575,6 +2584,7 @@ ERns      |U8 *|find_span_end_mask|NN U8 * s|NN const U8 * send   \
 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 \
+                               |NN char *loceol                \
                                |NN regmatch_info *const reginfo \
                                |I32 max
 ERs    |bool   |regtry         |NN regmatch_info *reginfo|NN char **startposp
@@ -2731,7 +2741,18 @@ s        |void   |anonymise_cv_maybe     |NN GV *gv|NN CV *cv
 : Used in sv.c and hv.c
 po     |void * |more_bodies    |const svtype sv_type|const size_t body_size \
                                |const size_t arena_size
+EXpR   |SV*    |get_and_check_backslash_N_name|NN const char* s        \
+                               |NN const char* const e                 \
+                               |const bool is_utf8                     \
+                               |NN const char** error_msg
 
+: For use ONLY in B::Hooks::Parser, by special dispensation
+EXpMR  |char*  |scan_str       |NN char *start|int keep_quoted \
+                               |int keep_delims|int re_reparse \
+                               |NULLOK char **delimp
+EXpM   |char*  |scan_word      |NN char *s|NN char *dest|STRLEN destlen \
+                               |int allow_package|NN STRLEN *slp
+EXpMR  |char*  |skipspace_flags|NN char *s|U32 flags
 #if defined(PERL_IN_TOKE_C)
 s      |void   |check_uni
 s      |void   |force_next     |I32 type
@@ -2741,7 +2762,7 @@ s |char*  |force_word     |NN char *start|int token|int check_keyword \
                                |int allow_pack
 s      |SV*    |tokeq          |NN SV *sv
 sR     |char*  |scan_const     |NN char *start
-sR     |SV*    |get_and_check_backslash_N_name|NN const char* s \
+sR     |SV*    |get_and_check_backslash_N_name_wrapper|NN const char* s \
                                |NN const char* const e
 sR     |char*  |scan_formline  |NN char *s
 sR     |char*  |scan_heredoc   |NN char *s
@@ -2749,16 +2770,10 @@ s       |char*  |scan_ident     |NN char *s|NN char *dest       \
                                |STRLEN destlen|I32 ck_uni
 sR     |char*  |scan_inputsymbol|NN char *start
 sR     |char*  |scan_pat       |NN char *start|I32 type
-sR     |char*  |scan_str       |NN char *start|int keep_quoted \
-                               |int keep_delims|int re_reparse \
-                               |NULLOK char **delimp
 sR     |char*  |scan_subst     |NN char *start
 sR     |char*  |scan_trans     |NN char *start
-s      |char*  |scan_word      |NN char *s|NN char *dest|STRLEN destlen \
-                               |int allow_package|NN STRLEN *slp
 s      |void   |update_debugger_info|NULLOK SV *orig_sv \
                                |NULLOK const char *const buf|STRLEN len
-sR     |char*  |skipspace_flags|NN char *s|U32 flags
 sR     |char*  |swallow_bom    |NN U8 *s
 #ifndef PERL_NO_UTF16_FILTER
 s      |I32    |utf16_textfilter|int idx|NN SV *sv|int maxlen
@@ -2781,10 +2796,11 @@ sR      |I32    |sublex_start
 sR     |char * |filter_gets    |NN SV *sv|STRLEN append
 sR     |HV *   |find_in_my_stash|NN const char *pkgname|STRLEN len
 sR     |char * |tokenize_use   |int is_use|NN char *s
-so     |SV*    |new_constant   |NULLOK const char *s|STRLEN len \
+so     |SV*    |new_constant   |NULLOK const char *s|STRLEN len            \
                                |NN const char *key|STRLEN keylen|NN SV *sv \
-                               |NULLOK SV *pv|NULLOK const char *type \
-                               |STRLEN typelen
+                               |NULLOK SV *pv|NULLOK const char *type      \
+                               |STRLEN typelen                             \
+                               |NULLOK const char ** error_msg
 s      |int    |ao             |int toketype
 s      |void|parse_ident|NN char **s|NN char **d \
                      |NN char * const e|int allow_package \
@@ -3127,7 +3143,7 @@ px        |void   |my_clearenv
 Apo    |void*  |my_cxt_init    |NN const char *my_cxt_key|size_t size
 Apo    |int    |my_cxt_index   |NN const char *my_cxt_key
 #else
-Apo    |void*  |my_cxt_init    |NN int *index|size_t size
+Apo    |void*  |my_cxt_init    |NN int *indexp|size_t size
 #endif
 #endif
 #if defined(PERL_IN_UTIL_C)
@@ -3274,4 +3290,6 @@ XEop      |void   |dtrace_probe_op   |NN const OP *op
 XEop   |void   |dtrace_probe_phase|enum perl_phase phase
 #endif
 
+XEop   |STRLEN*|dup_warnings   |NULLOK STRLEN* warnings
+
 : ex: set ts=8 sts=4 sw=4 noet: