diff options
author | Karl Williamson <khw@cpan.org> | 2018-07-19 16:26:34 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-07-19 16:28:06 -0600 |
commit | cb57a253c69fe8de1944b420abb61efdc241bbad (patch) | |
tree | dad9e6b63f9539c802a2496a27ba5ac202d50acd | |
parent | 3b8ffc90f45719aac51ef6e57afea6a501731a5a (diff) | |
download | perl-cb57a253c69fe8de1944b420abb61efdc241bbad.tar.gz |
Revert "Remove some deprecated functions from mathoms.c"
This reverts commit e6e9f5a198d7e054e6857a9c6e99a07d639f7f3c.
I think it best to revert this until I'm ready for stating in perldelta
exactly the options for replacing uses of these functions.
-rw-r--r-- | embed.fnc | 28 | ||||
-rw-r--r-- | embed.h | 72 | ||||
-rw-r--r-- | ext/XS-APItest/APItest.pm | 2 | ||||
-rw-r--r-- | ext/XS-APItest/APItest.xs | 16 | ||||
-rw-r--r-- | ext/XS-APItest/t/handy_base.pl | 6 | ||||
-rw-r--r-- | mathoms.c | 241 | ||||
-rw-r--r-- | proto.h | 220 |
7 files changed, 580 insertions, 5 deletions
@@ -765,6 +765,8 @@ AbDMpR |bool |is_uni_punct |UV c AbDMpPR |bool |is_uni_xdigit |UV c AMp |UV |to_uni_upper |UV c|NN U8 *p|NN STRLEN *lenp AMp |UV |to_uni_title |UV c|NN U8 *p|NN STRLEN *lenp +AbDMpR |bool |isIDFIRST_lazy |NN const char* p +AbDMpR |bool |isALNUM_lazy |NN const char* p p |void |init_uniprops EpX |SV * |parse_uniprop_string|NN const char * const name \ |const Size_t len \ @@ -877,6 +879,10 @@ AMpR |bool |_is_utf8_FOO|U8 classnum|NN const U8 * const p \ |NN const char * const file|const unsigned line AMpR |bool |_is_utf8_FOO_with_len|const U8 classnum|NN const U8 *p \ |NN const U8 * const e +AbDMpR |bool |is_utf8_alnum |NN const U8 *p +AbDMpR |bool |is_utf8_alnumc |NN const U8 *p +AbDMpR |bool |is_utf8_idfirst|NN const U8 *p +AbDMpR |bool |is_utf8_xidfirst|NN const U8 *p AMpR |bool |_is_utf8_idcont|NN const U8 *p AMpR |bool |_is_utf8_idstart|NN const U8 *p AMpR |bool |_is_utf8_xidcont|NN const U8 *p @@ -885,7 +891,25 @@ AMpR |bool |_is_utf8_perl_idcont_with_len|NN const U8 *p \ |NN const U8 * const e AMpR |bool |_is_utf8_perl_idstart_with_len|NN const U8 *p \ |NN const U8 * const e +AbDMpR |bool |is_utf8_idcont |NN const U8 *p +AbDMpR |bool |is_utf8_xidcont |NN const U8 *p +AbDMpR |bool |is_utf8_alpha |NN const U8 *p +AbDMpR |bool |is_utf8_ascii |NN const U8 *p +AbDMpR |bool |is_utf8_blank |NN const U8 *p +AbDMpR |bool |is_utf8_space |NN const U8 *p +AbDMpR |bool |is_utf8_perl_space |NN const U8 *p +AbDMpR |bool |is_utf8_perl_word |NN const U8 *p +AbDMpR |bool |is_utf8_cntrl |NN const U8 *p +AbDMpR |bool |is_utf8_digit |NN const U8 *p +AbDMpR |bool |is_utf8_posix_digit |NN const U8 *p +AbDMpR |bool |is_utf8_graph |NN const U8 *p +AbDMpR |bool |is_utf8_upper |NN const U8 *p +AbDMpR |bool |is_utf8_lower |NN const U8 *p +AbDMpR |bool |is_utf8_print |NN const U8 *p +AbDMpR |bool |is_utf8_punct |NN const U8 *p +AbDMpR |bool |is_utf8_xdigit |NN const U8 *p AMpR |bool |_is_utf8_mark |NN const U8 *p +AbDMpR |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 @@ -1788,15 +1812,19 @@ s |UV |_to_utf8_case |const UV uv1 \ |NULLOK const U8 * const aux_table_lengths \ |NN const char * const normal #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 \ |NN U8* ustrp|NULLOK STRLEN *lenp|bool flags \ |NN const char * const file|const int line +ApbmdD |UV |to_utf8_upper |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp AMp |UV |_to_utf8_upper_flags |NN const U8 *p|NULLOK const U8 *e \ |NN U8* ustrp|NULLOK STRLEN *lenp|bool flags \ |NN const char * const file|const int line +ApbmdD |UV |to_utf8_title |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp AMp |UV |_to_utf8_title_flags |NN const U8 *p|NULLOK const U8* e \ |NN U8* ustrp|NULLOK STRLEN *lenp|bool flags \ |NN const char * const file|const int line +ApbmdD |UV |to_utf8_fold |NN const U8 *p|NN U8* ustrp|NULLOK STRLEN *lenp AMp |UV |_to_utf8_fold_flags|NN const U8 *p|NULLOK const U8 *e \ |NN U8* ustrp|NULLOK STRLEN *lenp|U8 flags \ |NN const char * const file|const int line @@ -259,7 +259,13 @@ #define init_stacks() Perl_init_stacks(aTHX) #define init_tm(a) Perl_init_tm(aTHX_ a) #define intro_my() Perl_intro_my(aTHX) +#ifndef NO_MATHOMS +#define isALNUM_lazy(a) Perl_isALNUM_lazy(aTHX_ a) +#endif #define isC9_STRICT_UTF8_CHAR S_isC9_STRICT_UTF8_CHAR +#ifndef NO_MATHOMS +#define isIDFIRST_lazy(a) Perl_isIDFIRST_lazy(aTHX_ a) +#endif #define isSTRICT_UTF8_CHAR S_isSTRICT_UTF8_CHAR #define isUTF8_CHAR S_isUTF8_CHAR #define is_c9strict_utf8_string_loclen S_is_c9strict_utf8_string_loclen @@ -357,14 +363,80 @@ #define is_uni_xdigit_lc(a) Perl_is_uni_xdigit_lc(aTHX_ a) #endif #ifndef NO_MATHOMS +#define is_utf8_alnum(a) Perl_is_utf8_alnum(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_alnumc(a) Perl_is_utf8_alnumc(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_alpha(a) Perl_is_utf8_alpha(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_ascii(a) Perl_is_utf8_ascii(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_blank(a) Perl_is_utf8_blank(aTHX_ a) +#endif +#ifndef NO_MATHOMS #define is_utf8_char Perl_is_utf8_char #endif +#ifndef NO_MATHOMS +#define is_utf8_cntrl(a) Perl_is_utf8_cntrl(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_digit(a) Perl_is_utf8_digit(aTHX_ a) +#endif #define is_utf8_fixed_width_buf_loclen_flags S_is_utf8_fixed_width_buf_loclen_flags +#ifndef NO_MATHOMS +#define is_utf8_graph(a) Perl_is_utf8_graph(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_idcont(a) Perl_is_utf8_idcont(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_idfirst(a) Perl_is_utf8_idfirst(aTHX_ a) +#endif #define is_utf8_invariant_string_loc S_is_utf8_invariant_string_loc +#ifndef NO_MATHOMS +#define is_utf8_lower(a) Perl_is_utf8_lower(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_mark(a) Perl_is_utf8_mark(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_perl_space(a) Perl_is_utf8_perl_space(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_perl_word(a) Perl_is_utf8_perl_word(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_posix_digit(a) Perl_is_utf8_posix_digit(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_print(a) Perl_is_utf8_print(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_punct(a) Perl_is_utf8_punct(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_space(a) Perl_is_utf8_space(aTHX_ a) +#endif #define is_utf8_string_flags S_is_utf8_string_flags #define is_utf8_string_loclen Perl_is_utf8_string_loclen #define is_utf8_string_loclen_flags S_is_utf8_string_loclen_flags +#ifndef NO_MATHOMS +#define is_utf8_upper(a) Perl_is_utf8_upper(aTHX_ a) +#endif #define is_utf8_valid_partial_char_flags S_is_utf8_valid_partial_char_flags +#ifndef NO_MATHOMS +#define is_utf8_xdigit(a) Perl_is_utf8_xdigit(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_xidcont(a) Perl_is_utf8_xidcont(aTHX_ a) +#endif +#ifndef NO_MATHOMS +#define is_utf8_xidfirst(a) Perl_is_utf8_xidfirst(aTHX_ a) +#endif #define isinfnan Perl_isinfnan #define leave_adjust_stacks(a,b,c,d) Perl_leave_adjust_stacks(aTHX_ a,b,c,d) #define leave_scope(a) Perl_leave_scope(aTHX_ a) diff --git a/ext/XS-APItest/APItest.pm b/ext/XS-APItest/APItest.pm index ba76d8f4da..61531fc97a 100644 --- a/ext/XS-APItest/APItest.pm +++ b/ext/XS-APItest/APItest.pm @@ -5,7 +5,7 @@ use strict; use warnings; use Carp; -our $VERSION = '1.00'; +our $VERSION = '0.99'; require XSLoader; diff --git a/ext/XS-APItest/APItest.xs b/ext/XS-APItest/APItest.xs index 76c2ef5d33..a30659f14f 100644 --- a/ext/XS-APItest/APItest.xs +++ b/ext/XS-APItest/APItest.xs @@ -6434,9 +6434,11 @@ test_toLOWER_utf8(SV * p, int type) else if (type == -1) { resultant_cp = toLOWER_utf8(input, s, &len); } +#ifndef NO_MATHOMS else { - croak("fail: Unexpected type=%d", type); + resultant_cp = Perl_to_utf8_lower(aTHX_ input, s, &len); } +#endif av_push(av, newSVuv(resultant_cp)); utf8 = newSVpvn((char *) s, len); @@ -6522,9 +6524,11 @@ test_toFOLD_utf8(SV * p, int type) else if (type == -1) { resultant_cp = toFOLD_utf8(input, s, &len); } +#ifndef NO_MATHOMS else { - croak("fail: Unexpected type=%d", type); + resultant_cp = Perl_to_utf8_fold(aTHX_ input, s, &len); } +#endif av_push(av, newSVuv(resultant_cp)); utf8 = newSVpvn((char *) s, len); @@ -6610,9 +6614,11 @@ test_toUPPER_utf8(SV * p, int type) else if (type == -1) { resultant_cp = toUPPER_utf8(input, s, &len); } +#ifndef NO_MATHOMS else { - croak("fail: Unexpected type=%d", type); + resultant_cp = Perl_to_utf8_upper(aTHX_ input, s, &len); } +#endif av_push(av, newSVuv(resultant_cp)); utf8 = newSVpvn((char *) s, len); @@ -6691,9 +6697,11 @@ test_toTITLE_utf8(SV * p, int type) else if (type == -1) { resultant_cp = toTITLE_utf8(input, s, &len); } +#ifndef NO_MATHOMS else { - croak("fail: Unexpected type=%d", type); + resultant_cp = Perl_to_utf8_title(aTHX_ input, s, &len); } +#endif av_push(av, newSVuv(resultant_cp)); utf8 = newSVpvn((char *) s, len); diff --git a/ext/XS-APItest/t/handy_base.pl b/ext/XS-APItest/t/handy_base.pl index 9143eabfe0..7e8194e643 100644 --- a/ext/XS-APItest/t/handy_base.pl +++ b/ext/XS-APItest/t/handy_base.pl @@ -163,6 +163,7 @@ my %utf8_param_code = ( "_safe" => 0, "_safe, malformed" => 1, "deprecated unsafe" => -1, + "deprecated mathoms" => -2, ); # This test is split into this number of files. @@ -555,8 +556,13 @@ foreach my $name (sort keys %to_properties) { foreach my $utf8_param("_safe", "_safe, malformed", "deprecated unsafe", + "deprecated mathoms", ) { + use Config; + next if $utf8_param eq 'deprecated mathoms' + && $Config{'ccflags'} =~ /-DNO_MATHOMS/; + my $utf8_param_code = $utf8_param_code{$utf8_param}; my $expect_error = $utf8_param_code > 0; @@ -1140,6 +1140,38 @@ Perl_newSUB(pTHX_ I32 floor, OP *o, OP *proto, OP *block) return newATTRSUB(floor, o, proto, NULL, block); } +UV +Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +{ + PERL_ARGS_ASSERT_TO_UTF8_FOLD; + + return toFOLD_utf8(p, ustrp, lenp); +} + +UV +Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +{ + PERL_ARGS_ASSERT_TO_UTF8_LOWER; + + return toLOWER_utf8(p, ustrp, lenp); +} + +UV +Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +{ + PERL_ARGS_ASSERT_TO_UTF8_TITLE; + + return toTITLE_utf8(p, ustrp, lenp); +} + +UV +Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) +{ + PERL_ARGS_ASSERT_TO_UTF8_UPPER; + + return toUPPER_utf8(p, ustrp, lenp); +} + SV * Perl_sv_mortalcopy(pTHX_ SV *const oldstr) { @@ -1168,6 +1200,22 @@ ASCII_TO_NEED(const UV enc, const UV ch) return ch; } +bool /* Made into a function, so can be deprecated */ +Perl_isIDFIRST_lazy(pTHX_ const char* p) +{ + PERL_ARGS_ASSERT_ISIDFIRST_LAZY; + + return isIDFIRST_lazy_if(p,1); +} + +bool /* Made into a function, so can be deprecated */ +Perl_isALNUM_lazy(pTHX_ const char* p) +{ + PERL_ARGS_ASSERT_ISALNUM_LAZY; + + return isALNUM_lazy_if(p,1); +} + bool Perl_is_uni_alnum(pTHX_ UV c) { @@ -1329,6 +1377,38 @@ Perl_is_uni_idfirst(pTHX_ UV c) } bool +Perl_is_utf8_idfirst(pTHX_ const U8 *p) /* The naming is historical. */ +{ + PERL_ARGS_ASSERT_IS_UTF8_IDFIRST; + + return _is_utf8_idstart(p); +} + +bool +Perl_is_utf8_xidfirst(pTHX_ const U8 *p) /* The naming is historical. */ +{ + PERL_ARGS_ASSERT_IS_UTF8_XIDFIRST; + + return _is_utf8_xidstart(p); +} + +bool +Perl_is_utf8_idcont(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_IDCONT; + + return _is_utf8_idcont(p); +} + +bool +Perl_is_utf8_xidcont(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_XIDCONT; + + return _is_utf8_xidcont(p); +} + +bool Perl_is_uni_upper_lc(pTHX_ UV c) { return isUPPER_LC_uvchr(c); @@ -1400,6 +1480,167 @@ Perl_to_uni_lower_lc(pTHX_ U32 c) return (U32)to_uni_lower(c, tmpbuf, &len); } +bool +Perl_is_utf8_alnum(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_ALNUM; + + /* NOTE: "IsWord", not "IsAlnum", since Alnum is a true + * descendant of isalnum(3), in other words, it doesn't + * contain the '_'. --jhi */ + return isWORDCHAR_utf8(p); +} + +bool +Perl_is_utf8_alnumc(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_ALNUMC; + + return isALPHANUMERIC_utf8(p); +} + +bool +Perl_is_utf8_alpha(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_ALPHA; + + return isALPHA_utf8(p); +} + +bool +Perl_is_utf8_ascii(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_ASCII; + PERL_UNUSED_CONTEXT; + + return isASCII_utf8(p); +} + +bool +Perl_is_utf8_blank(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_BLANK; + PERL_UNUSED_CONTEXT; + + return isBLANK_utf8(p); +} + +bool +Perl_is_utf8_space(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_SPACE; + PERL_UNUSED_CONTEXT; + + return isSPACE_utf8(p); +} + +bool +Perl_is_utf8_perl_space(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_PERL_SPACE; + PERL_UNUSED_CONTEXT; + + /* Only true if is an ASCII space-like character, and ASCII is invariant + * under utf8, so can just use the macro */ + return isSPACE_A(*p); +} + +bool +Perl_is_utf8_perl_word(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_PERL_WORD; + PERL_UNUSED_CONTEXT; + + /* Only true if is an ASCII word character, and ASCII is invariant + * under utf8, so can just use the macro */ + return isWORDCHAR_A(*p); +} + +bool +Perl_is_utf8_digit(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_DIGIT; + + return isDIGIT_utf8(p); +} + +bool +Perl_is_utf8_posix_digit(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_POSIX_DIGIT; + PERL_UNUSED_CONTEXT; + + /* Only true if is an ASCII digit character, and ASCII is invariant + * under utf8, so can just use the macro */ + return isDIGIT_A(*p); +} + +bool +Perl_is_utf8_upper(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_UPPER; + + return isUPPER_utf8(p); +} + +bool +Perl_is_utf8_lower(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_LOWER; + + return isLOWER_utf8(p); +} + +bool +Perl_is_utf8_cntrl(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_CNTRL; + PERL_UNUSED_CONTEXT; + + return isCNTRL_utf8(p); +} + +bool +Perl_is_utf8_graph(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_GRAPH; + + return isGRAPH_utf8(p); +} + +bool +Perl_is_utf8_print(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_PRINT; + + return isPRINT_utf8(p); +} + +bool +Perl_is_utf8_punct(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_PUNCT; + + return isPUNCT_utf8(p); +} + +bool +Perl_is_utf8_xdigit(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_XDIGIT; + PERL_UNUSED_CONTEXT; + + return isXDIGIT_utf8(p); +} + +bool +Perl_is_utf8_mark(pTHX_ const U8 *p) +{ + PERL_ARGS_ASSERT_IS_UTF8_MARK; + + return _is_utf8_mark(p); +} + /* =for apidoc is_utf8_char @@ -1406,6 +1406,14 @@ PERL_CALLCONV OP* Perl_invert(pTHX_ OP* cmd) PERL_CALLCONV bool Perl_io_close(pTHX_ IO* io, GV *gv, bool not_implicit, bool warn_on_fail); #define PERL_ARGS_ASSERT_IO_CLOSE \ assert(io) +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_isALNUM_lazy(pTHX_ const char* p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_ISALNUM_LAZY \ + assert(p) +#endif + #ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE Size_t S_isC9_STRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e) __attribute__warn_unused_result__; @@ -1413,6 +1421,14 @@ PERL_STATIC_INLINE Size_t S_isC9_STRICT_UTF8_CHAR(const U8 * const s0, const U8 assert(s0); assert(e) #endif +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_isIDFIRST_lazy(pTHX_ const char* p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_ISIDFIRST_LAZY \ + assert(p) +#endif + #ifndef PERL_NO_INLINE_FUNCTIONS PERL_STATIC_INLINE Size_t S_isSTRICT_UTF8_CHAR(const U8 * const s0, const U8 * const e) __attribute__warn_unused_result__; @@ -1654,6 +1670,46 @@ PERL_CALLCONV bool Perl_is_uni_xdigit_lc(pTHX_ UV c) #endif #ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_alnum(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_ALNUM \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_alnumc(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_ALNUMC \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_alpha(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_ALPHA \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_ascii(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_ASCII \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_blank(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_BLANK \ + assert(p) +#endif + +#ifndef NO_MATHOMS PERL_CALLCONV STRLEN Perl_is_utf8_char(const U8 *s) __attribute__deprecated__; #define PERL_ARGS_ASSERT_IS_UTF8_CHAR \ @@ -1665,6 +1721,22 @@ PERL_CALLCONV STRLEN Perl_is_utf8_char_buf(const U8 *buf, const U8 *buf_end); #define PERL_ARGS_ASSERT_IS_UTF8_CHAR_BUF \ assert(buf); assert(buf_end) #endif +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_cntrl(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_CNTRL \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_digit(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_DIGIT \ + assert(p) +#endif + /* PERL_CALLCONV bool is_utf8_fixed_width_buf_flags(const U8 * const s, STRLEN len, const U32 flags); */ /* PERL_CALLCONV bool is_utf8_fixed_width_buf_loc_flags(const U8 * const s, STRLEN len, const U8 **ep, const U32 flags); */ #ifndef PERL_NO_INLINE_FUNCTIONS @@ -1672,6 +1744,30 @@ PERL_STATIC_INLINE bool S_is_utf8_fixed_width_buf_loclen_flags(const U8 * const #define PERL_ARGS_ASSERT_IS_UTF8_FIXED_WIDTH_BUF_LOCLEN_FLAGS \ assert(s) #endif +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_graph(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_GRAPH \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_idcont(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_IDCONT \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_idfirst(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_IDFIRST \ + assert(p) +#endif + /* PERL_CALLCONV bool is_utf8_invariant_string(const U8* const s, STRLEN len) __attribute__warn_unused_result__; */ @@ -1682,6 +1778,70 @@ PERL_STATIC_INLINE bool S_is_utf8_invariant_string_loc(const U8* const s, STRLEN assert(s) #endif +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_lower(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_LOWER \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_mark(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_MARK \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_perl_space(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_PERL_SPACE \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_perl_word(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_PERL_WORD \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_posix_digit(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_POSIX_DIGIT \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_print(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_PRINT \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_punct(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_PUNCT \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_space(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_SPACE \ + assert(p) +#endif + /* PERL_CALLCONV bool Perl_is_utf8_string(const U8 *s, STRLEN len) __attribute__warn_unused_result__; */ @@ -1708,6 +1868,14 @@ PERL_STATIC_INLINE bool S_is_utf8_string_loclen_flags(const U8 *s, STRLEN len, c #define PERL_ARGS_ASSERT_IS_UTF8_STRING_LOCLEN_FLAGS \ assert(s) #endif +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_upper(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_UPPER \ + assert(p) +#endif + /* PERL_CALLCONV bool is_utf8_valid_partial_char(const U8 * const s, const U8 * const e) __attribute__warn_unused_result__ __attribute__pure__; */ @@ -1719,6 +1887,30 @@ PERL_STATIC_INLINE bool S_is_utf8_valid_partial_char_flags(const U8 * const s, c assert(s); assert(e) #endif +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_xdigit(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_XDIGIT \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_xidcont(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_XIDCONT \ + assert(p) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV bool Perl_is_utf8_xidfirst(pTHX_ const U8 *p) + __attribute__deprecated__ + __attribute__warn_unused_result__; +#define PERL_ARGS_ASSERT_IS_UTF8_XIDFIRST \ + assert(p) +#endif + PERL_CALLCONV bool Perl_isinfnan(NV nv) __attribute__warn_unused_result__ __attribute__pure__; @@ -3560,6 +3752,34 @@ PERL_CALLCONV U32 Perl_to_uni_upper_lc(pTHX_ U32 c) __attribute__warn_unused_result__; #endif +#ifndef NO_MATHOMS +PERL_CALLCONV UV Perl_to_utf8_fold(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) + __attribute__deprecated__; +#define PERL_ARGS_ASSERT_TO_UTF8_FOLD \ + assert(p); assert(ustrp) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV UV Perl_to_utf8_lower(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) + __attribute__deprecated__; +#define PERL_ARGS_ASSERT_TO_UTF8_LOWER \ + assert(p); assert(ustrp) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV UV Perl_to_utf8_title(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) + __attribute__deprecated__; +#define PERL_ARGS_ASSERT_TO_UTF8_TITLE \ + assert(p); assert(ustrp) +#endif + +#ifndef NO_MATHOMS +PERL_CALLCONV UV Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp) + __attribute__deprecated__; +#define PERL_ARGS_ASSERT_TO_UTF8_UPPER \ + assert(p); assert(ustrp) +#endif + PERL_CALLCONV bool Perl_try_amagic_bin(pTHX_ int method, int flags); PERL_CALLCONV bool Perl_try_amagic_un(pTHX_ int method, int flags); #ifndef NO_MATHOMS |