/*
----------------------------------------------------------------------
- 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.
=head1 NAME
-ppport.h - Perl/Pollution/Portability version 3.56
+ppport.h - Perl/Pollution/Portability version 3.58
=head1 SYNOPSIS
=head1 COMPATIBILITY
This version of F<ppport.h> 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
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,
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
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
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
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
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|
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
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
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
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
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
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
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
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
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
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
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
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
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
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|
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
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
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
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|
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
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
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
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
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
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
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
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
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
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
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|
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
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
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
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|
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|
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|
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|
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|
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
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|
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
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
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
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
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
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|
sub find_api
{
+ BEGIN { 'warnings'->unimport('uninitialized') if "$]" > '5.006' }
my $code = shift;
- no warnings 'uninitialized';
$code =~ s{
/ (?: \*[^*]*\*+(?:[^$ccs][^*]*\*+)* / | /[^\r\n]*)
| "[^"\\]*(?:\\.[^"\\]*)*"
# 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
#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))))
: (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
#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
#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
#endif
#ifndef isDIGIT
-# define isDIGIT(c) ((c) <= '9' && (c) >= '0')
+# define isDIGIT(c) inRANGE(c, '0', '9')
#endif
#ifndef isDIGIT_L1
#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 \
#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
#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 \
#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)))
#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) \
# 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
#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
#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)
# 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
#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
#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
# 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);
# 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)) { \
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)
#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))
# 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
# 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
# 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 { \
#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
UTF8SKIP(s))))
#endif
+/* UTF8_CHK_SKIP depends on my_strnlen */
#ifndef UTF8_SKIP
# define UTF8_SKIP(s) UTF8SKIP(s)
#endif
#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) \
* 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)
}
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 */
* 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);
/* 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)