From: Karen Etheridge Date: Sun, 26 Apr 2020 16:26:22 +0000 (-0700) Subject: update ppport.h to 3.58 X-Git-Tag: v0.006022~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e157f8827a1ba2ccf3cdf66efa7d49219be582e5;p=p5sagit%2FDevel-Declare.git update ppport.h to 3.58 --- diff --git a/ppport.h b/ppport.h index 59122eb..6bb3017 100644 --- a/ppport.h +++ b/ppport.h @@ -4,9 +4,9 @@ /* ---------------------------------------------------------------------- - ppport.h -- Perl/Pollution/Portability Version 3.56 + ppport.h -- Perl/Pollution/Portability Version 3.58 - Automatically created by Devel::PPPort running under perl 5.010001. + Automatically created by Devel::PPPort running under perl 5.031010. Do NOT edit this file directly! -- Edit PPPort_pm.PL and the includes in parts/inc/ instead. @@ -21,7 +21,7 @@ SKIP =head1 NAME -ppport.h - Perl/Pollution/Portability version 3.56 +ppport.h - Perl/Pollution/Portability version 3.58 =head1 SYNOPSIS @@ -56,7 +56,7 @@ ppport.h - Perl/Pollution/Portability version 3.56 =head1 COMPATIBILITY This version of F is designed to support operation with Perl -installations back to 5.003_07, and has been tested up to 5.31.6. +installations back to 5.003_07, and has been tested up to 5.31.10. =head1 OPTIONS @@ -511,10 +511,12 @@ sub sort_api_lines # Sort lines of the form flags|return|name|args... use strict; +BEGIN { require warnings if "$]" > '5.006' } + # Disable broken TRIE-optimization BEGIN { eval '${^RE_TRIE_MAXBUF} = -1' if "$]" >= 5.009004 && "$]" <= 5.009005 } -my $VERSION = 3.56; +my $VERSION = 3.58; my %opt = ( quiet => 0, @@ -688,6 +690,7 @@ bytes_to_utf8|5.006001|5.006001|x call_argv|5.006000|5.003007|p call_atexit|5.006000|5.006000|u CALL_BLOCK_HOOKS|||xi +CALL_CHECKER_REQUIRE_GV|5.021004|5.021004| caller_cx|5.013005|5.006000|p call_list|5.004000|5.004000|u call_method|5.006000|5.003007|p @@ -736,7 +739,8 @@ clear_special_blocks|5.021003||Viu clone_params_del|5.013002|5.013002|nu clone_params_new|5.013002|5.013002|nu closest_cop|5.007002||Viu -cntrl_to_mnemonic|5.021004||nViu +cntrl_to_mnemonic|5.021004||ncViu +compile_wildcard|5.031010||Viu compute_EXACTish|5.017003||nViu construct_ahocorasick_from_trie|5.021001||Viu cop_fetch_label|5.015001|5.015001|x @@ -758,6 +762,7 @@ cophh_fetch_pvn|5.013007|5.013007|x cophh_fetch_pvs|5.013007|5.013007|x cophh_fetch_sv|5.013007|5.013007|x cophh_free|5.013007|5.013007|x +COPHH_KEY_UTF8|5.013007|5.013007| cophh_new_empty|5.013007|5.013007|x cophh_store_pv|5.013007|5.013007|x cophh_store_pvn|5.013007|5.013007|x @@ -797,9 +802,9 @@ croak_popstack|5.017008||ncViu croak_sv|5.013001|5.003007|p croak_xs_usage|5.010001|5.003007|pn cr_textfilter|5.006000||Viu -csighandler1|||nu -csighandler3|||nu -csighandler|||nu +csighandler1|5.031007|5.031007|nu +csighandler3|5.031007|5.031007|nu +csighandler|5.031007|5.031007|nu current_re_engine|5.017001||cViu curse|5.013009||Viu custom_op_desc|5.007003|5.007003|d @@ -820,6 +825,7 @@ CvGV|5.003007|5.003007|u cvgv_from_hek|||ciu cvgv_set|5.013003||cViu cv_name|5.021005|5.021005| +CV_NAME_NOTQUAL|5.021005|5.021005| CvPADLIST|5.008001|5.008001|x cv_set_call_checker|5.013006|5.013006| cv_set_call_checker_flags|5.021004|5.021004| @@ -1014,6 +1020,7 @@ ERRSV|5.004005|5.003007|p eval_pv|5.006000|5.003007|p eval_sv|5.006000|5.003007|p exec_failed|5.009004||Viu +execute_wildcard|5.031010||Viu expect_number|5.007001||Viu EXTEND|5.003007|5.003007| EXTERN_C|5.005000|5.003007|poVu @@ -1031,7 +1038,7 @@ find_array_subscript|5.009004||Viu find_beginning|5.005000||Viu find_byclass|5.006000||Viu find_default_stash|5.019004||Viu -find_first_differing_byte_pos|||nViu +find_first_differing_byte_pos|5.031007||nViu find_hash_subscript|5.009004||Viu find_in_my_stash|5.006001||Viu find_lexical_cv|5.019001||Viu @@ -1064,8 +1071,9 @@ force_version|5.005000||Viu force_word|5.003007||Viu forget_pmop|5.017007||Viu form|5.006000|5.004000|v +form_alien_digit_msg|5.031009||cViu +form_cp_too_large_msg|5.031009||cViu form_nocontext|5.006000||vnVu -form_short_octal_warning|5.017008||Viu fp_dup|5.007003|5.007003|u fprintf_nocontext|5.006000||vndVu free_c_backtrace|5.021001||Vi @@ -1122,9 +1130,10 @@ G_NOARGS|5.003007|5.003007| gp_dup|5.007003|5.007003|u gp_free|5.003007|5.003007|u gp_ref|5.003007|5.003007|u -G_RETHROW||5.003007|p +G_RETHROW|5.031002|5.003007|p grok_atoUV|5.021010||ncVi grok_bin|5.007003|5.003007|p +grok_bin_oct_hex|5.031008||cVu grok_bslash_c|5.013001||cViu grok_bslash_N|5.017003||Viu grok_bslash_o|5.013003||cViu @@ -1140,6 +1149,8 @@ group_end|5.007003||Viu G_SCALAR|5.003007|5.003007| GV_ADD|5.003007|5.003007| gv_add_by_type|5.011000|5.011000|u +GV_ADDMG|5.015003|5.015003| +GV_ADDMULTI|5.003007|5.003007| Gv_AMupdate|5.011000|5.011000|u gv_autoload4|5.004000|5.004000|u gv_autoload_pv|5.015004|5.015004|u @@ -1191,6 +1202,9 @@ gv_magicalize|5.019004||Viu gv_magicalize_isa|5.013005||Viu gv_name_set|5.009004|5.009004|u GV_NOADD_MASK|5.009005|5.003007|poVu +GV_NOADD_NOINIT|5.009003|5.009003| +GV_NOEXPAND|5.009003|5.009003| +GV_NOINIT|5.004005|5.004005| G_VOID|5.004000|5.004000| gv_override|5.019006||Viu gv_setref|5.021005||Viu @@ -1260,6 +1274,7 @@ hv_iterkeysv|5.003007|5.003007| hv_iternext|5.003007|5.003007| hv_iternext_flags|5.008000|5.008000|x hv_iternextsv|5.003007|5.003007| +HV_ITERNEXT_WANTPLACEHOLDERS|5.008000|5.008000| hv_iterval|5.003007|5.003007| hv_kill_backrefs|||xiu hv_ksplit|5.003007|5.003007|u @@ -1349,7 +1364,7 @@ invlist_iterfinish|5.017008||nViu invlist_iterinit|5.015001||nViu invlist_iternext|5.015001||nViu _invlist_len|5.017004||nViu -invlist_lowest|||nxViu +invlist_lowest|5.031007||nxViu invlist_max|5.013010||nViu invlist_previous_index|5.017004||nViu invlist_replace_list_destroys_src|5.023009||Viu @@ -1440,7 +1455,7 @@ isFOO_utf8_lc|5.017008||Viu isGCB|5.021009||Viu isGRAPH|5.006000|5.003007|p isGRAPH_A|5.013006|5.003007|p -_is_grapheme|5.025009||Viu +is_grapheme|5.031007||Viu isGRAPH_L1|5.013006|5.003007|p isGRAPH_LC|5.006000|5.006000| isGRAPH_LC_utf8_safe|5.025009|5.006000|p @@ -1469,7 +1484,7 @@ isIDFIRST_utf8|5.031005|5.031005| isIDFIRST_utf8_safe|5.025009|5.006000|p isIDFIRST_uvchr|5.023009|5.006000|p isinfnan|5.021004|5.021004|n -isinfnansv|5.021005||Viu +isinfnansv|5.021005||Vi _is_in_locale_category|5.021001||cViu is_invariant_string|5.021007|5.011000|pn is_invlist|5.029002||nViu @@ -1611,6 +1626,7 @@ LEAVE_with_name|5.011002|5.011002| lex_bufutf8|5.011002|5.011002|x lex_discard_to|5.011002|5.011002|x lex_grow_linestr|5.011002|5.011002|x +LEX_KEEP_PREVIOUS|5.011002|5.011002| lex_next_chunk|5.011002|5.011002|x lex_peek_unichar|5.011002|5.011002|x lex_read_space|5.011002|5.011002|x @@ -1621,11 +1637,13 @@ lex_stuff_pv|5.013006|5.013006|x lex_stuff_pvn|5.011002|5.011002|x lex_stuff_pvs|5.013005|5.013005|x lex_stuff_sv|5.011002|5.011002|x +LEX_STUFF_UTF8|5.011002|5.011002| lex_unstuff|5.011002|5.011002|x LIKELY|5.009004|5.003007|p LINKLIST|5.013006|5.013006| list|5.003007||Viu listkids|5.003007||Viu +load_charnames|5.031010||cViu load_module|5.006000|5.003007|pv load_module_nocontext|5.006000||vnVu localize|5.003007||Viu @@ -1710,6 +1728,7 @@ matcher_matches_sv|5.027008||Viu maybe_multimagic_gv|5.019004||Viu mayberelocate|5.015006||Viu measure_struct|5.007003||Viu +memCHRs|5.031008|5.003007|p mem_collxfrm|5.003007||dViu _mem_collxfrm|5.025002||Viu memEQ|5.004000|5.003007|p @@ -1914,8 +1933,8 @@ newSVpvs_share|5.009003|5.003007|p newSVREF|5.003007|5.003007|u newSVrv|5.003007|5.003007| newSVsv|5.003007|5.003007| -newSVsv_flags|5.029009|5.007002|pu -newSVsv_nomg|5.029009|5.007003|p +newSVsv_flags|5.029009|5.003007|pu +newSVsv_nomg|5.029009|5.003007|p newSV_type|5.009005|5.003007|p newSVuv|5.006000|5.003007|p newUNOP|5.003007|5.003007| @@ -1973,6 +1992,7 @@ op_dump|5.006000|5.006000| openn_cleanup|5.019010||Viu openn_setup|5.019010||Viu open_script|5.005000||Viu +OPf_KIDS|5.003007|5.003007| op_free|5.003007|5.003007| OpHAS_SIBLING|5.021007|5.003007|p op_integerize|5.015003||Viu @@ -1986,6 +2006,8 @@ OpMORESIB_set|5.021011|5.003007|p OP_NAME|5.007003|5.007003| op_null|5.007002|5.007002| op_parent|5.025001|5.025001|n +OPpEARLY_CV|5.006000|5.006000| +OPpENTERSUB_AMPER|5.003007|5.003007| op_prepend_elem|5.013006|5.013006| op_refcnt_dec|||xiu op_refcnt_inc|||xiu @@ -2007,6 +2029,7 @@ op_unscope|5.017003||xViu ORIGMARK|5.003007|5.003007| OSNAME|5.003007|5.003007| OSVERS|5.007002|5.007002| +output_non_portable|5.031008||Viu output_posix_warnings|5.029005||Viu package|5.003007||Viu package_version|5.011001||Viu @@ -2071,6 +2094,7 @@ PadnamePV|5.017004|5.017004|x PadnameREFCNT|5.021007|5.021007|x PadnameREFCNT_dec|5.021007|5.021007|x PadnameSV|5.017004|5.017004|x +PADNAMEt_OUTER|5.021007|5.021007| PadnameTYPE|||i PadnameUTF8|5.017004|5.017004|x pad_new|5.008001|5.008001| @@ -2099,6 +2123,7 @@ parse_ident|5.017010||Viu parse_label|5.013007|5.013007|x parse_listexpr|5.013008|5.013008|x parse_lparen_question_flags|5.017009||Viu +PARSE_OPTIONAL|5.013007|5.013007| parser_dup|5.009000|5.009000|u parser_free|5.009005||Viu parser_free_nexttoke_ops|5.017006||Viu @@ -2119,6 +2144,12 @@ perl_clone_using|5.006000||nVu perl_construct|5.003007|5.003007|n Perl_custom_op_xop|5.013007||V perl_destruct|5.007003|5.007003|n +Perl_eval_pv||5.003007|ou +Perl_eval_sv||5.003007|ou +PERL_EXIT_ABORT|5.019003|5.019003| +PERL_EXIT_DESTRUCT_END|5.007003|5.007003| +PERL_EXIT_EXPECTED|5.006000|5.006000| +PERL_EXIT_WARN|5.019003|5.019003| perl_free|5.003007|5.003007|n PERL_HASH|5.003007|5.003007|p PERL_INT_MAX|5.003007|5.003007|p @@ -2179,9 +2210,9 @@ PerlLIO_dup2_cloexec|5.027008||Viu PerlLIO_dup_cloexec|5.027008||Viu PerlLIO_open3_cloexec|5.027008||Viu PerlLIO_open_cloexec|5.027008||Viu -PERL_LOADMOD_DENY||5.003007|ou -PERL_LOADMOD_IMPORT_OPS||5.003007|ou -PERL_LOADMOD_NOIMPORT||5.003007|ou +PERL_LOADMOD_DENY|5.006000|5.003007| +PERL_LOADMOD_IMPORT_OPS|5.006000|5.003007| +PERL_LOADMOD_NOIMPORT|5.006000|5.003007| PERL_LONG_MAX|5.003007|5.003007|p PERL_LONG_MIN|5.003007|5.003007|p PERL_MAGIC_arylen|5.007002|5.003007|p @@ -2287,7 +2318,7 @@ PERL_USE_GCC_BRACE_GROUPS|5.009004|5.004000|poVu PERL_USHORT_MAX|5.003007|5.003007|p PERL_USHORT_MIN|5.003007|5.003007|p PERL_VERSION|5.006000|5.003007|p -perly_sighandler|||nu +perly_sighandler|5.031007|5.031007|nu pidgone|5.003007||Viu PL_bufend||5.003007|pou PL_bufptr||5.003007|pou @@ -2332,6 +2363,7 @@ PL_parser|5.009005|5.003007|p PL_peepp|5.007003|5.007003| PL_perldb|5.004005|5.003007|poVu PL_perl_destruct_level|5.004005|5.003007|p +PL_phase|5.013007|5.013007| PL_ppaddr|5.006000|5.003007|poVu PL_rpeepp|5.013005|5.013005| PL_rsfp||5.003007|pou @@ -2352,6 +2384,7 @@ PL_sv_zero|5.027003|5.027003| PL_tainted|5.004005|5.003007|poVu PL_tainting|5.004005|5.003007|poVu PL_tokenbuf||5.003007|pou +PL_Xpv|5.005000|5.003007|poVu pm_description|5.009004||Viu pmop_dump|5.006000|5.006000|u pmruntime|5.003007||Viu @@ -2426,13 +2459,13 @@ pv_pretty|5.009004|5.003007|p pv_uni_display|5.007003|5.007003| qerror|5.006000||cViu quadmath_format_needed|5.021004||nVi -quadmath_format_valid|||nVi +quadmath_format_valid|5.031007||nVi RANDBITS|5.003007|5.003007| READ_XDIGIT|5.017006|5.017006| realloc|5.007002|5.007002|n ReANY|||ncu re_compile|5.009005|5.009005|u -re_croak2|||iu +re_croak|||iu re_dup_guts|5.011000|5.011000|u reentrant_free|5.010000|5.010000|u reentrant_init|5.010000|5.010000|u @@ -2495,6 +2528,7 @@ reg_numbered_buff_fetch|5.009005||cViu reg_numbered_buff_length|5.009005||cViu reg_numbered_buff_store|5.009005||cViu regpiece|5.005000||Viu +regpnode|5.031010||Viu regprop|5.003007||Viu reg_qr_package|5.009005||cViu regrepeat|5.005000||Viu @@ -2510,6 +2544,7 @@ re_intuit_string|5.006000||cVu Renew|5.003007|5.003007| Renewc|5.003007|5.003007| re_op_compile|5.017001||Viu +re_op_compile_wrapper|5.031010||Viu repeatcpy|5.003007|5.003007|nu REPLACEMENT_CHARACTER_UTF8|5.025005|5.003007|p report_evil_fh|5.006001||Viu @@ -2535,6 +2570,8 @@ runops_debug|5.005000|5.005000|u runops_standard|5.005000|5.005000|u run_user_filter|5.009003||Viu rv2cv_op_cv|5.013006|5.013006| +RV2CVOPCV_MARK_EARLY|5.013006|5.013006| +RV2CVOPCV_RETURN_NAME_GV|5.013006|5.013006| rvpv_dup|5.007003|5.007003|u rxres_free|5.004000||Viu rxres_restore|5.004000||Viu @@ -2665,8 +2702,8 @@ share_hek_flags|5.008000||Viu SHORTSIZE|5.004000|5.004000| should_warn_nl|5.021001||nViu si_dup|5.007003|5.007003|u -sighandler1|||nViu -sighandler3|||nViu +sighandler1|5.031007||nViu +sighandler3|5.031007||nViu sighandler|5.003007||nViu simplify_sort|5.006000||Viu SITELIB|5.003007|5.003007| @@ -2762,6 +2799,7 @@ sv_backoff|5.003007|5.003007|n sv_bless|5.003007|5.003007| sv_buf_to_ro|5.019008||Viu sv_buf_to_rw|5.019008||Viu +SV_CATBYTES|5.021005|5.021005| sv_cat_decode|5.008001|5.008001| sv_catpv|5.003007|5.003007| sv_catpvf|5.006000|5.004000|v @@ -2783,6 +2821,7 @@ sv_catsv|5.003007|5.003007| sv_catsv_flags|5.007002|5.007002| sv_catsv_mg|5.004005|5.003007|p sv_catsv_nomg|5.007002|5.003007|p +SV_CATUTF8|5.021005|5.021005| sv_chop|5.003007|5.003007| sv_clean_all|5.003007||Vi sv_clean_objs|5.003007||Vi @@ -2824,8 +2863,8 @@ SvEND|5.003007|5.003007| sv_eq|5.003007|5.003007| sv_eq_flags|5.013006|5.013006| sv_exp_grow|5.009003||Viu -SVf|5.006000|5.003007|poVu -SVfARG|5.009005|5.003007|pV +SVf|5.006000|5.003007|p +SVfARG|5.009005|5.003007|p sv_force_normal|5.006000|5.006000| sv_force_normal_flags|5.007001|5.007001| sv_free2|||xciu @@ -2855,12 +2894,13 @@ SvIOK_only_UV|5.006000|5.006000| SvIOKp|5.003007|5.003007| SvIOK_UV|5.006000|5.006000| sv_isa|5.003007|5.003007| +sv_isa_sv|5.031007|5.031007|x SvIsCOW|5.008003|5.008003| SvIsCOW_shared_hash|5.008003|5.008003| sv_isobject|5.003007|5.003007| SvIV|5.003007|5.003007| sv_iv|5.005000|5.005000|d -SvIV_nomg|5.009001|5.007003|p +SvIV_nomg|5.009001|5.003007|p SvIV_set|5.003007|5.003007| SvIVX|5.003007|5.003007| SvIVx|5.003007|5.003007| @@ -2877,7 +2917,7 @@ sv_magicext_mglob|5.019002||cViu sv_magic_portable||5.004000|pou SvMAGIC_set|5.009003|5.003007|p sv_mortalcopy|5.003007|5.003007| -sv_mortalcopy_flags|5.017005|5.007002|p +sv_mortalcopy_flags|5.017005|5.003007|p SV_MUTABLE_RETURN|5.009003|5.003007|poVu sv_ncmp|5.009003||Viu sv_newmortal|5.003007|5.003007| @@ -2892,11 +2932,11 @@ SvNOK_only|5.003007|5.003007| SvNOKp|5.003007|5.003007| sv_nolocking|5.007003|5.007003|d sv_nosharing|5.007003|5.007003| -SV_NOSTEAL|5.009002|5.007003|p +SV_NOSTEAL|5.009002|5.003007|p sv_nounlocking|5.007003|5.007003|d SvNV|5.006000|5.003007| sv_nv|5.006000|5.005000|d -SvNV_nomg|5.013002|5.007003|p +SvNV_nomg|5.013002|5.003007|p SvNV_set|5.006000|5.003007| SvNVX|5.006000|5.003007| SvNVx|5.006000|5.003007| @@ -3035,7 +3075,7 @@ sv_setref_uv|5.007001|5.007001| sv_setsv|5.003007|5.003007| SvSetSV|5.003007|5.003007| sv_setsv_cow|5.009000||xcViu -sv_setsv_flags|5.007002|5.007002|p +sv_setsv_flags|5.007002|5.003007|p sv_setsv_mg|5.004005|5.003007|p sv_setsv_nomg|5.007002|5.003007|p SvSetSV_nosteal|5.004000|5.004000| @@ -3045,6 +3085,7 @@ sv_setuv_mg|5.004005|5.003007|p SvSHARE|5.007003|5.007003| SvSHARED_HASH|5.009003||pVu SV_SMAGIC|5.009003|5.003007|p +SVs_PADSTALE|5.009000|5.009000| SvSTASH|5.003007|5.003007| SvSTASH_set|5.009003|5.003007|p SVs_TEMP|5.003007|5.003007| @@ -3074,7 +3115,7 @@ SVt_PVNV|5.003007|5.003007| SVt_REGEXP|5.011000|5.011000| SvTRUE|5.003007|5.003007| sv_true|5.005000|5.005000| -SvTRUE_nomg|5.013006|5.007003|p +SvTRUE_nomg|5.013006|5.003007|p SvTRUEx|5.003007|5.003007| SvTYPE|5.003007|5.003007| svtype|5.003007|5.003007|V @@ -3092,7 +3133,7 @@ SvUPGRADE|5.003007|5.003007| sv_usepvn|5.003007|5.003007| sv_usepvn_flags|5.009004|5.009004| sv_usepvn_mg|5.004005|5.003007|p -SvUTF8|5.006000|5.006000| +SvUTF8|5.006000|5.003007|p sv_utf8_decode|5.006000|5.006000| sv_utf8_downgrade|5.006000|5.006000| sv_utf8_downgrade_flags|5.031004|5.031004| @@ -3107,7 +3148,7 @@ sv_utf8_upgrade_flags_grow|5.011000|5.011000| sv_utf8_upgrade_nomg|5.007002|5.007002| SvUV|5.004000|5.003007|p sv_uv|5.005000|5.003007|pd -SvUV_nomg|5.009001|5.007003|p +SvUV_nomg|5.009001|5.003007|p SvUV_set|5.009003|5.003007|p SvUVX|5.004000|5.003007|p SvUVx|5.004000|5.003007|p @@ -3211,10 +3252,17 @@ usage|5.005000||Viu utf16_textfilter|5.011001||Viu utf16_to_utf8|5.006000||cViu utf16_to_utf8_reversed|5.006000||cViu +UTF8_CHECK_ONLY|5.007001|5.007001| UTF8_CHK_SKIP|5.031006|5.006000|p +UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE|5.025005|5.025005| +UTF8_DISALLOW_ILLEGAL_INTERCHANGE|5.013009|5.013009| +UTF8_DISALLOW_NONCHAR|5.013009|5.013009| +UTF8_DISALLOW_PERL_EXTENDED|5.027002|5.027002| +UTF8_DISALLOW_SUPER|5.013009|5.013009| +UTF8_DISALLOW_SURROGATE|5.013009|5.013009| utf8_distance|5.006000|5.006000| -UTF8f|5.019001|5.019001| -UTF8fARG|5.019002|5.019002| +UTF8f|5.019001|5.003007|p +UTF8fARG|5.019002|5.003007|p utf8_hop|5.006000|5.006000|n utf8_hop_back|5.025007|5.025007|n utf8_hop_forward|5.025007|5.025007|n @@ -3232,7 +3280,7 @@ utf8n_to_uvchr|5.007001|5.007001|n utf8n_to_uvchr_error|5.025006|5.025006|n utf8n_to_uvchr_msgs|5.027009|5.027009|nx _utf8n_to_uvchr_msgs_helper|5.029001||ncVu -utf8n_to_uvuni|5.007001||cV +utf8n_to_uvuni|5.007001||dcV UTF8_SAFE_SKIP|5.029009|5.006000|p UTF8SKIP|5.006000|5.006000| UTF8_SKIP|5.023002|5.006000|p @@ -3242,6 +3290,12 @@ utf8_to_uvchr_buf|5.015009|5.006001|p utf8_to_uvchr_buf_helper|5.031004||cVu utf8_to_uvuni|5.007001||dcV utf8_to_uvuni_buf|5.015009||dcV +UTF8_WARN_ILLEGAL_C9_INTERCHANGE|5.025005|5.025005| +UTF8_WARN_ILLEGAL_INTERCHANGE|5.013009|5.013009| +UTF8_WARN_NONCHAR|5.013009|5.013009| +UTF8_WARN_PERL_EXTENDED|5.027002|5.027002| +UTF8_WARN_SUPER|5.013009|5.013009| +UTF8_WARN_SURROGATE|5.013009|5.013009| utilize|5.003007||Viu UVCHR_IS_INVARIANT|5.019004|5.003007|p UVCHR_SKIP|5.022000|5.003007|p @@ -3255,7 +3309,7 @@ UVSIZE|5.006000|5.003007|p UVTYPE|5.006000|5.003007|p UVuf|5.006000|5.003007|p uvuni_to_utf8|5.019004||cVu -uvuni_to_utf8_flags|5.007003||cV +uvuni_to_utf8_flags|5.007003||dcV UVxf|5.006000|5.003007|p UVXf|5.007001|5.007001|p validate_proto|5.019002||xcVi @@ -3301,6 +3355,7 @@ WARN_EXPERIMENTAL__ALPHA_ASSERTIONS|5.027009|5.027009| WARN_EXPERIMENTAL__BITWISE|5.021009|5.021009| WARN_EXPERIMENTAL__CONST_ATTR|5.021008|5.021008| WARN_EXPERIMENTAL__DECLARED_REFS|5.025003|5.025003| +WARN_EXPERIMENTAL__ISA|5.031007|5.031007| WARN_EXPERIMENTAL__LEXICAL_SUBS|5.017005|5.017005| WARN_EXPERIMENTAL__POSTDEREF|5.019005|5.019005| WARN_EXPERIMENTAL__PRIVATE_USE|5.029009|5.029009| @@ -3455,8 +3510,8 @@ my($hint, $define, $function); sub find_api { + BEGIN { 'warnings'->unimport('uninitialized') if "$]" > '5.006' } my $code = shift; - no warnings 'uninitialized'; $code =~ s{ / (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*) | "[^"\\]*(?:\\.[^"\\]*)*" @@ -4771,6 +4826,7 @@ extern U32 DPPP_(my_PL_signals); # define PL_DBsub DBsub # define PL_DBtrace DBtrace # define PL_Sv Sv +# define PL_Xpv Xpv # define PL_bufend bufend # define PL_bufptr bufptr # define PL_compiling compiling @@ -5158,7 +5214,19 @@ DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv) #endif -/* These could become provided when they become part of the public API */ +#ifndef WIDEST_UTYPE +# ifdef QUADKIND +# ifdef U64TYPE +# define WIDEST_UTYPE U64TYPE +# else +# define WIDEST_UTYPE unsigned Quad_t +# endif +# else +# define WIDEST_UTYPE U32 +# endif +#endif + +/* These could become provided if/when they become part of the public API */ #ifndef withinCOUNT # define withinCOUNT(c, l, n) \ (((WIDEST_UTYPE) (((c)) - ((l) | 0))) <= (((WIDEST_UTYPE) ((n) | 0)))) @@ -5172,6 +5240,14 @@ DPPP_(my_newCONSTSUB)(HV *stash, const char *name, SV *sv) : (withinCOUNT(((WIDEST_UTYPE) (c)), (l), ((u) - (l))))) #endif +/* The '| 0' part ensures a compiler error if c is not integer (like e.g., a + * pointer) */ +#undef FITS_IN_8_BITS /* handy.h version uses a core-only constant */ +#ifndef FITS_IN_8_BITS +# define FITS_IN_8_BITS(c) ( (sizeof(c) == 1) \ + || !(((WIDEST_UTYPE)((c) | 0)) & ~0xFF)) +#endif + /* Create the macro for "is'macro'_utf8_safe(s, e)". For code points below * 256, it calls the equivalent _L1 macro by converting the UTF-8 to code * point. That is so that it can automatically get the bug fixes done in this @@ -5527,18 +5603,6 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #endif -#ifndef WIDEST_UTYPE -# ifdef QUADKIND -# ifdef U64TYPE -# define WIDEST_UTYPE U64TYPE -# else -# define WIDEST_UTYPE Quad_t -# endif -# else -# define WIDEST_UTYPE U32 -# endif -#endif - /* On versions without NATIVE_TO_ASCII, only ASCII is supported */ #if defined(EBCDIC) && defined(NATIVE_TO_ASCI) #ifndef NATIVE_TO_LATIN1 @@ -5841,7 +5905,7 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #ifndef isBLANK_L1 # define isBLANK_L1(c) ( isBLANK(c) \ - || ( (WIDEST_UTYPE) (c) < 256 \ + || ( FITS_IN_8_BITS(c) \ && NATIVE_TO_LATIN1((U8) c) == 0xA0)) #endif @@ -5850,7 +5914,7 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #endif #ifndef isDIGIT -# define isDIGIT(c) ((c) <= '9' && (c) >= '0') +# define isDIGIT(c) inRANGE(c, '0', '9') #endif #ifndef isDIGIT_L1 @@ -5893,7 +5957,7 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #ifndef isLOWER_L1 # define isLOWER_L1(c) ( isLOWER(c) \ - || ( (WIDEST_UTYPE) (c) < 256 \ + || ( FITS_IN_8_BITS(c) \ && ( ( NATIVE_TO_LATIN1((U8) c) >= 0xDF \ && NATIVE_TO_LATIN1((U8) c) != 0xF7) \ || NATIVE_TO_LATIN1((U8) c) == 0xAA \ @@ -5914,7 +5978,7 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #endif #ifndef isPRINT_L1 -# define isPRINT_L1(c) ((WIDEST_UTYPE) (c) < 256 && ! isCNTRL_L1(c)) +# define isPRINT_L1(c) (FITS_IN_8_BITS(c) && ! isCNTRL_L1(c)) #endif #ifndef isPSXSPC @@ -5941,7 +6005,7 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #ifndef isPUNCT_L1 # define isPUNCT_L1(c) ( isPUNCT(c) \ - || ( (WIDEST_UTYPE) (c) < 256 \ + || ( FITS_IN_8_BITS(c) \ && ( NATIVE_TO_LATIN1((U8) c) == 0xA1 \ || NATIVE_TO_LATIN1((U8) c) == 0xA7 \ || NATIVE_TO_LATIN1((U8) c) == 0xAB \ @@ -5958,14 +6022,14 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #ifndef isSPACE_L1 # define isSPACE_L1(c) ( isSPACE(c) \ - || ( (WIDEST_UTYPE) (c) < 256 \ + || (FITS_IN_8_BITS(c) \ && ( NATIVE_TO_LATIN1((U8) c) == 0x85 \ || NATIVE_TO_LATIN1((U8) c) == 0xA0))) #endif #ifndef isUPPER_L1 # define isUPPER_L1(c) ( isUPPER(c) \ - || ( (WIDEST_UTYPE) (c) < 256 \ + || (FITS_IN_8_BITS(c) \ && ( NATIVE_TO_LATIN1((U8) c) >= 0xC0 \ && NATIVE_TO_LATIN1((U8) c) <= 0xDE \ && NATIVE_TO_LATIN1((U8) c) != 0xD7))) @@ -6080,30 +6144,37 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #endif #ifndef isASCII_uvchr -# define isASCII_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isASCII_L1(c) : 0) +# define isASCII_uvchr(c) (FITS_IN_8_BITS(c) ? isASCII_L1(c) : 0) #endif #if (PERL_BCDVERSION >= 0x5006000) +# ifdef isALPHA_uni /* If one defined, all are; this is just an exemplar */ +# define D_PPP_is_ctype(upper, lower, c) \ + (FITS_IN_8_BITS(c) \ + ? is ## upper ## _L1(c) \ + : is ## upper ## _uni((UV) (c))) /* _uni is old synonym */ +# else +# define D_PPP_is_ctype(upper, lower, c) \ + (FITS_IN_8_BITS(c) \ + ? is ## upper ## _L1(c) \ + : is_uni_ ## lower((UV) (c))) /* is_uni_ is even older */ +# endif #ifndef isALPHA_uvchr -# define isALPHA_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isALPHA_L1(c) : is_uni_alpha((UV) (c))) +# define isALPHA_uvchr(c) D_PPP_is_ctype(ALPHA, alpha, c) #endif #ifndef isALPHANUMERIC_uvchr -# define isALPHANUMERIC_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isALPHANUMERIC_L1(c) : (is_uni_alpha((UV) (c)) || is_uni_digit((UV) (c)))) +# define isALPHANUMERIC_uvchr(c) (isALPHA_uvchr(c) || isDIGIT_uvchr(c)) #endif # ifdef is_uni_blank #ifndef isBLANK_uvchr -# define isBLANK_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isBLANK_L1(c) : is_uni_blank((UV) (c))) +# define isBLANK_uvchr(c) D_PPP_is_ctype(BLANK, blank, c) #endif # else #ifndef isBLANK_uvchr -# define isBLANK_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ +# define isBLANK_uvchr(c) (FITS_IN_8_BITS(c) \ ? isBLANK_L1(c) \ : ( (UV) (c) == 0x1680 /* Unicode 3.0 */ \ || inRANGE((UV) (c), 0x2000, 0x200A) \ @@ -6114,18 +6185,15 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); # endif #ifndef isCNTRL_uvchr -# define isCNTRL_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isCNTRL_L1(c) : is_uni_cntrl((UV) (c))) +# define isCNTRL_uvchr(c) D_PPP_is_ctype(CNTRL, cntrl, c) #endif #ifndef isDIGIT_uvchr -# define isDIGIT_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isDIGIT_L1(c) : is_uni_digit((UV) (c))) +# define isDIGIT_uvchr(c) D_PPP_is_ctype(DIGIT, digit, c) #endif #ifndef isGRAPH_uvchr -# define isGRAPH_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isGRAPH_L1(c) : is_uni_graph((UV) (c))) +# define isGRAPH_uvchr(c) D_PPP_is_ctype(GRAPH, graph, c) #endif #ifndef isIDCONT_uvchr @@ -6133,18 +6201,15 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #endif #ifndef isIDFIRST_uvchr -# define isIDFIRST_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isIDFIRST_L1(c) : is_uni_idfirst((UV) (c))) +# define isIDFIRST_uvchr(c) D_PPP_is_ctype(IDFIRST, idfirst, c) #endif #ifndef isLOWER_uvchr -# define isLOWER_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isLOWER_L1(c) : is_uni_lower((UV) (c))) +# define isLOWER_uvchr(c) D_PPP_is_ctype(LOWER, lower, c) #endif #ifndef isPRINT_uvchr -# define isPRINT_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isPRINT_L1(c) : is_uni_print((UV) (c))) +# define isPRINT_uvchr(c) D_PPP_is_ctype(PRINT, print, c) #endif #ifndef isPSXSPC_uvchr @@ -6152,28 +6217,24 @@ typedef OP* (CPERLscope(*Perl_check_t)) (pTHX_ OP*); #endif #ifndef isPUNCT_uvchr -# define isPUNCT_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isPUNCT_L1(c) : is_uni_punct((UV) (c))) +# define isPUNCT_uvchr(c) D_PPP_is_ctype(PUNCT, punct, c) #endif #ifndef isSPACE_uvchr -# define isSPACE_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isSPACE_L1(c) : is_uni_space((UV) (c))) +# define isSPACE_uvchr(c) D_PPP_is_ctype(SPACE, space, c) #endif #ifndef isUPPER_uvchr -# define isUPPER_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isUPPER_L1(c) : is_uni_upper((UV) (c))) +# define isUPPER_uvchr(c) D_PPP_is_ctype(UPPER, upper, c) #endif #ifndef isXDIGIT_uvchr -# define isXDIGIT_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isXDIGIT_L1(c) : is_uni_xdigit((UV) (c))) +# define isXDIGIT_uvchr(c) D_PPP_is_ctype(XDIGIT, xdigit, c) #endif #ifndef isWORDCHAR_uvchr -# define isWORDCHAR_uvchr(c) ((WIDEST_UTYPE) (c) < 256 \ - ? isWORDCHAR_L1(c) : is_uni_alnum((UV) (c))) +# define isWORDCHAR_uvchr(c) (FITS_IN_8_BITS(c) \ + ? isWORDCHAR_L1(c) : isALPHANUMERIC_uvchr(c)) #endif #ifndef isALPHA_utf8_safe # define isALPHA_utf8_safe(s,e) D_PPP_IS_GENERIC_UTF8_SAFE(s, e, ALPHA) @@ -6941,13 +7002,22 @@ DPPP_(my_sv_setpvf_mg_nocontext)(SV * const sv, const char * const pat, ...) # define SV_COW_SHARED_HASH_KEYS 0 #endif -#if (PERL_BCDVERSION < 0x5007002) +#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +#ifndef sv_2pv_flags +# define sv_2pv_flags(sv, lp, flags) ({ SV *_sv = (sv); const I32 _flags = (flags); STRLEN *_lp = lp; _lp = _lp ? : &PL_na; (!(_flags & SV_GMAGIC) && SvGMAGICAL(_sv)) ? ({ char *_pv; SvGMAGICAL_off(_sv); _pv = sv_2pv(_sv, _lp); SvGMAGICAL_on(_sv); _pv; }) : sv_2pv(_sv, _lp); }) +#endif + +#ifndef sv_pvn_force_flags +# define sv_pvn_force_flags(sv, lp, flags) ({ SV *_sv = (sv); const I32 _flags = (flags); STRLEN *_lp = lp; _lp = _lp ? : &PL_na; (!(_flags & SV_GMAGIC) && SvGMAGICAL(_sv)) ? ({ char *_pv; SvGMAGICAL_off(_sv); _pv = sv_pvn_force(_sv, _lp); SvGMAGICAL_on(_sv); _pv; }) : sv_pvn_force(_sv, _lp); }) +#endif + +#else #ifndef sv_2pv_flags -# define sv_2pv_flags(sv, lp, flags) sv_2pv((sv), (lp) ? (lp) : &PL_na) +# define sv_2pv_flags(sv, lp, flags) ((PL_Sv = (sv)), (!((flags) & SV_GMAGIC) && SvGMAGICAL(PL_Sv)) ? (SvGMAGICAL_off(PL_Sv), (PL_Xpv = (XPV *)sv_2pv(PL_Sv, (lp) ? (lp) : &PL_na)), SvGMAGICAL_on(PL_Sv), (char *)PL_Xpv) : sv_2pv(PL_Sv, (lp) ? (lp) : &PL_na)) #endif #ifndef sv_pvn_force_flags -# define sv_pvn_force_flags(sv, lp, flags) sv_pvn_force((sv), (lp) ? (lp) : &PL_na) +# define sv_pvn_force_flags(sv, lp, flags) ((PL_Sv = (sv)), (!((flags) & SV_GMAGIC) && SvGMAGICAL(PL_Sv)) ? (SvGMAGICAL_off(PL_Sv), (PL_Xpv = (XPV *)sv_pvn_force(PL_Sv, (lp) ? (lp) : &PL_na)), SvGMAGICAL_on(PL_Sv), (char *)PL_Xpv) : sv_pvn_force(PL_Sv, (lp) ? (lp) : &PL_na)) #endif #endif @@ -7449,6 +7519,9 @@ DPPP_(my_my_strnlen)(const char *str, Size_t maxlen) #ifndef memNEs # define memNEs(s1, l, s2) !memEQs(s1, l, s2) #endif +#ifndef memCHRs +# define memCHRs(s, c) ((const char *) memchr("" s "" , c, sizeof(s)-1)) +#endif #ifndef MoveD # define MoveD(s,d,n,t) memmove((char*)(d),(char*)(s), (n) * sizeof(t)) #endif @@ -7826,11 +7899,31 @@ DPPP_(my_croak_xs_usage)(const CV *const cv, const char *const params) #ifndef call_method # define call_method perl_call_method #endif + #ifndef eval_sv # define eval_sv perl_eval_sv #endif +#if (PERL_BCDVERSION >= 0x5003098) && (PERL_BCDVERSION < 0x5006000) +#ifndef eval_pv +# define eval_pv perl_eval_pv +#endif + +#endif /* Replace: 0 */ + +#if (PERL_BCDVERSION < 0x5006000) +#ifndef Perl_eval_sv +# define Perl_eval_sv perl_eval_sv +#endif + +#if (PERL_BCDVERSION >= 0x5003098) +#ifndef Perl_eval_pv +# define Perl_eval_pv perl_eval_pv +#endif + +#endif +#endif #ifndef PERL_LOADMOD_DENY # define PERL_LOADMOD_DENY 0x1 #endif @@ -7887,8 +7980,7 @@ DPPP_(my_croak_xs_usage)(const CV *const cv, const char *const params) # endif #endif -/* Replace perl_eval_pv with eval_pv */ - +/* This is backport for Perl 5.3.97d and older which do not provide perl_eval_pv */ #ifndef eval_pv #if defined(NEED_eval_pv) static SV * DPPP_(my_eval_pv)(const char * p, I32 croak_on_error); @@ -8247,10 +8339,13 @@ DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...) # define newSVpvn_flags(s, len, flags) ((PL_Sv = newSVpvn(D_PPP_CONSTPV_ARG((s)), (len))), SvFLAGS(PL_Sv) |= ((flags) & SVf_UTF8), (((flags) & SVs_TEMP) ? sv_2mortal(PL_Sv) : PL_Sv)) #endif #endif +#ifndef SV_NOSTEAL +# define SV_NOSTEAL 16 +#endif #if ( (PERL_BCDVERSION >= 0x5007003) && (PERL_BCDVERSION < 0x5008007) ) || ( (PERL_BCDVERSION >= 0x5009000) && (PERL_BCDVERSION < 0x5009002) ) #undef sv_setsv_flags -#define SV_NOSTEAL 16 +#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) #define sv_setsv_flags(dstr, sstr, flags) \ STMT_START { \ if (((flags) & SV_NOSTEAL) && (sstr) && (SvFLAGS((SV *)(sstr)) & SVs_TEMP)) { \ @@ -8261,6 +8356,78 @@ DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...) Perl_sv_setsv_flags(aTHX_ (dstr), (sstr), (flags) & ~SV_NOSTEAL); \ } \ } STMT_END +#else + ( \ + (((flags) & SV_NOSTEAL) && (sstr) && (SvFLAGS((SV *)(sstr)) & SVs_TEMP)) ? ( \ + SvTEMP_off((SV *)(sstr)), \ + Perl_sv_setsv_flags(aTHX_ (dstr), (sstr), (flags) & ~SV_NOSTEAL), \ + SvTEMP_on((SV *)(sstr)), \ + 1 \ + ) : ( \ + Perl_sv_setsv_flags(aTHX_ (dstr), (sstr), (flags) & ~SV_NOSTEAL), \ + 1 \ + ) \ + ) +#endif +#endif + +#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +#ifndef sv_setsv_flags +# define sv_setsv_flags(dstr, sstr, flags) \ + STMT_START { \ + if (((flags) & SV_NOSTEAL) && (sstr) && (SvFLAGS((SV *)(sstr)) & SVs_TEMP)) { \ + SvTEMP_off((SV *)(sstr)); \ + if (!((flags) & SV_GMAGIC) && (sstr) && SvGMAGICAL((SV *)(sstr))) { \ + SvGMAGICAL_off((SV *)(sstr)); \ + sv_setsv((dstr), (sstr)); \ + SvGMAGICAL_on((SV *)(sstr)); \ + } else { \ + sv_setsv((dstr), (sstr)); \ + } \ + SvTEMP_on((SV *)(sstr)); \ + } else { \ + if (!((flags) & SV_GMAGIC) && (sstr) && SvGMAGICAL((SV *)(sstr))) { \ + SvGMAGICAL_off((SV *)(sstr)); \ + sv_setsv((dstr), (sstr)); \ + SvGMAGICAL_on((SV *)(sstr)); \ + } else { \ + sv_setsv((dstr), (sstr)); \ + } \ + } \ + } STMT_END +#endif + +#else +#ifndef sv_setsv_flags +# define sv_setsv_flags(dstr, sstr, flags) \ + ( \ + (((flags) & SV_NOSTEAL) && (sstr) && (SvFLAGS((SV *)(sstr)) & SVs_TEMP)) ? ( \ + SvTEMP_off((SV *)(sstr)), \ + (!((flags) & SV_GMAGIC) && (sstr) && SvGMAGICAL((SV *)(sstr))) ? ( \ + SvGMAGICAL_off((SV *)(sstr)), \ + sv_setsv((dstr), (sstr)), \ + SvGMAGICAL_on((SV *)(sstr)), \ + 1 \ + ) : ( \ + sv_setsv((dstr), (sstr)), \ + 1 \ + ), \ + SvTEMP_on((SV *)(sstr)), \ + 1 \ + ) : ( \ + (!((flags) & SV_GMAGIC) && (sstr) && SvGMAGICAL((SV *)(sstr))) ? ( \ + SvGMAGICAL_off((SV *)(sstr)), \ + sv_setsv((dstr), (sstr)), \ + SvGMAGICAL_on((SV *)(sstr)), \ + 1 \ + ) : ( \ + sv_setsv((dstr), (sstr)), \ + 1 \ + ) \ + ) \ + ) +#endif + #endif #if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) @@ -8274,14 +8441,10 @@ DPPP_(my_load_module)(U32 flags, SV *name, SV *ver, ...) #endif #endif - -#ifdef SV_NOSTEAL #ifndef newSVsv_nomg # define newSVsv_nomg(sv) newSVsv_flags((sv), SV_NOSTEAL) #endif -#endif - #if (PERL_BCDVERSION >= 0x5017005) #ifndef sv_mortalcopy_flags # define sv_mortalcopy_flags(sv, flags) Perl_sv_mortalcopy_flags(aTHX_ (sv), (flags)) @@ -8497,7 +8660,27 @@ DPPP_(my_newSVpvn_share)(pTHX_ const char *s, I32 len, U32 hash) # define sv_pvn_nomg sv_pvn #endif -#ifdef SV_NOSTEAL +#ifdef SVf_IVisUV +#if defined(__GNUC__) && !defined(PERL_GCC_BRACE_GROUPS_FORBIDDEN) +#ifndef SvIV_nomg +# define SvIV_nomg(sv) (!SvGMAGICAL((sv)) ? SvIV((sv)) : ({ SV *_sviv = sv_mortalcopy_flags((sv), SV_NOSTEAL); IV _iv = SvIV(_sviv); SvFLAGS((sv)) = (SvFLAGS((sv)) & ~SVf_IVisUV) | (SvFLAGS(_sviv) & SVf_IVisUV); _iv; })) +#endif + +#ifndef SvUV_nomg +# define SvUV_nomg(sv) (!SvGMAGICAL((sv)) ? SvUV((sv)) : ({ SV *_svuv = sv_mortalcopy_flags((sv), SV_NOSTEAL); UV _uv = SvUV(_svuv); SvFLAGS((sv)) = (SvFLAGS((sv)) & ~SVf_IVisUV) | (SvFLAGS(_svuv) & SVf_IVisUV); _uv; })) +#endif + +#else +#ifndef SvIV_nomg +# define SvIV_nomg(sv) (!SvGMAGICAL((sv)) ? SvIV((sv)) : ((PL_Sv = sv_mortalcopy_flags((sv), SV_NOSTEAL)), sv_upgrade(PL_Sv, SVt_PVIV), (SvIVX(PL_Sv) = SvIV(PL_Sv)), (SvFLAGS((sv)) = (SvFLAGS((sv)) & ~SVf_IVisUV) | (SvFLAGS(PL_Sv) & SVf_IVisUV)), SvIVX(PL_Sv))) +#endif + +#ifndef SvUV_nomg +# define SvUV_nomg(sv) (!SvGMAGICAL((sv)) ? SvIV((sv)) : ((PL_Sv = sv_mortalcopy_flags((sv), SV_NOSTEAL)), sv_upgrade(PL_Sv, SVt_PVIV), (SvUVX(PL_Sv) = SvUV(PL_Sv)), (SvFLAGS((sv)) = (SvFLAGS((sv)) & ~SVf_IVisUV) | (SvFLAGS(PL_Sv) & SVf_IVisUV)), SvUVX(PL_Sv))) +#endif + +#endif +#else #ifndef SvIV_nomg # define SvIV_nomg(sv) (!SvGMAGICAL((sv)) ? SvIV((sv)) : SvIVx(sv_mortalcopy_flags((sv), SV_NOSTEAL))) #endif @@ -8506,6 +8689,7 @@ DPPP_(my_newSVpvn_share)(pTHX_ const char *s, I32 len, U32 hash) # define SvUV_nomg(sv) (!SvGMAGICAL((sv)) ? SvUV((sv)) : SvUVx(sv_mortalcopy_flags((sv), SV_NOSTEAL))) #endif +#endif #ifndef SvNV_nomg # define SvNV_nomg(sv) (!SvGMAGICAL((sv)) ? SvNV((sv)) : SvNVx(sv_mortalcopy_flags((sv), SV_NOSTEAL))) #endif @@ -8514,8 +8698,6 @@ DPPP_(my_newSVpvn_share)(pTHX_ const char *s, I32 len, U32 hash) # define SvTRUE_nomg(sv) (!SvGMAGICAL((sv)) ? SvTRUE((sv)) : SvTRUEx(sv_mortalcopy_flags((sv), SV_NOSTEAL))) #endif -#endif - #ifndef sv_catpv_mg # define sv_catpv_mg(sv, ptr) \ STMT_START { \ @@ -9694,6 +9876,28 @@ DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size) #endif #endif +#ifdef SVf_UTF8 +#ifndef SvUTF8 +# define SvUTF8(sv) (SvFLAGS(sv) & SVf_UTF8) +#endif + +#endif + +#if (PERL_BCDVERSION == 0x5019001) /* 5.19.1 does not have UTF8fARG, only broken UTF8f */ +#undef UTF8f +#endif + +#ifdef SVf_UTF8 +#ifndef UTF8f +# define UTF8f SVf +#endif + +#ifndef UTF8fARG +# define UTF8fARG(u,l,p) newSVpvn_flags((p), (l), ((u) ? SVf_UTF8 : 0) | SVs_TEMP) +#endif + +#endif + #define D_PPP_MIN(a,b) (((a) <= (b)) ? (a) : (b)) #ifndef UNICODE_REPLACEMENT # define UNICODE_REPLACEMENT 0xFFFD @@ -9851,6 +10055,7 @@ DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size) UTF8SKIP(s)))) #endif +/* UTF8_CHK_SKIP depends on my_strnlen */ #ifndef UTF8_SKIP # define UTF8_SKIP(s) UTF8SKIP(s) #endif @@ -9873,17 +10078,14 @@ DPPP_(my_my_strlcpy)(char *dst, const char *src, Size_t size) #endif #ifdef UVCHR_IS_INVARIANT -# if 'A' == 65 -# ifdef QUADKIND -# define D_PPP_UVCHR_SKIP_UPPER(c) \ - (WIDEST_UTYPE) (c) < \ - (((WIDEST_UTYPE) 1) << (6 * D_PPP_BYTE_INFO_BITS)) ? 7 : 13 -# else -# define D_PPP_UVCHR_SKIP_UPPER(c) 7 /* 32 bit platform */ -# endif -# else - /* In the releases this is backported to, UTF-EBCDIC had a max of 2**31-1 */ +# if 'A' != 65 || UVSIZE < 8 + /* 32 bit platform, which includes UTF-EBCDIC on the releases this is + * backported to */ # define D_PPP_UVCHR_SKIP_UPPER(c) 7 +# else +# define D_PPP_UVCHR_SKIP_UPPER(c) \ + (((WIDEST_UTYPE) (c)) < \ + (((WIDEST_UTYPE) 1) << (6 * D_PPP_BYTE_INFO_BITS)) ? 7 : 13) # endif #ifndef UVCHR_SKIP # define UVCHR_SKIP(c) \ @@ -10106,8 +10308,9 @@ DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen) * The modern versions allow anything that evaluates to a legal UV, but * not overlongs nor an empty input */ ret = D_PPP_utf8_to_uvchr_buf_callee( - s, curlen, retlen, (UTF8_ALLOW_ANYUV - & ~(UTF8_ALLOW_LONG|UTF8_ALLOW_EMPTY))); + (U8 *) /* Early perls: no const */ + s, curlen, retlen, (UTF8_ALLOW_ANYUV + & ~(UTF8_ALLOW_LONG|UTF8_ALLOW_EMPTY))); # if (PERL_BCDVERSION >= 0x5026000) && (PERL_BCDVERSION < 0x5028000) @@ -10156,6 +10359,7 @@ DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen) } else { ret = D_PPP_utf8_to_uvchr_buf_callee( + (U8 *) /* Early perls: no const */ s, curlen, retlen, UTF8_ALLOW_ANY); /* Override with the REPLACEMENT character, as that is what the * modern version of this function returns */ @@ -10167,7 +10371,7 @@ DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen) * length. It should not extend past the end of string, nor past * what the first byte indicates the length is, nor past the * continuation characters */ - if (retlen && *retlen >= 0) { + if (retlen && (IV) *retlen >= 0) { unsigned int i = 1; *retlen = D_PPP_MIN(*retlen, curlen); @@ -10220,7 +10424,7 @@ DPPP_(my_utf8_to_uvchr_buf)(pTHX_ const U8 *s, const U8 *send, STRLEN *retlen) /* Replace utf8_to_uvchr with utf8_to_uvchr_buf */ -#ifdef SV_NOSTEAL +#ifdef sv_len_utf8 /* Older Perl versions have broken sv_len_utf8() when passed sv does not have SVf_UTF8 flag set */ /* Also note that SvGETMAGIC() may change presence of SVf_UTF8 flag */ # if (PERL_BCDVERSION < 0x5017005)