In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/f2645549e6a4bfca055b5fd1932da462df424921?hp=3cedd9d93070bd6f0cb074a3013165cd9a630fca>

- Log -----------------------------------------------------------------
commit f2645549e6a4bfca055b5fd1932da462df424921
Author: Karl Williamson <[email protected]>
Date:   Mon May 5 22:46:48 2014 -0600

    Move some deprecated utf8-handling functions to mathoms
    
    This entailed creating new internal functions for some of them to call
    so that the functionality can be retained during the deprecation period.
-----------------------------------------------------------------------

Summary of changes:
 embed.fnc |   8 +++-
 embed.h   |   8 +++-
 inline.h  |  22 ++-------
 mathoms.c | 162 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 proto.h   |  28 ++++++++++-
 utf8.c    | 153 +++++++---------------------------------------------------
 6 files changed, 220 insertions(+), 161 deletions(-)

diff --git a/embed.fnc b/embed.fnc
index 30b1087..85dbdf4 100644
--- a/embed.fnc
+++ b/embed.fnc
@@ -654,8 +654,8 @@ ADMpPR      |bool   |is_uni_punct   |UV c
 ADMpPR |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
-iDMPR  |bool   |isIDFIRST_lazy |NN const char* p
-iDMPR  |bool   |isALNUM_lazy   |NN const char* p
+ADMpPR |bool   |isIDFIRST_lazy |NN const char* p
+ADMpPR |bool   |isALNUM_lazy   |NN const char* p
 #ifdef PERL_IN_UTF8_C
 sR     |U8     |to_lower_latin1|const U8 c|NULLOK U8 *p|NULLOK STRLEN *lenp
 #endif
@@ -697,6 +697,10 @@ ADMpR      |bool   |is_utf8_alnum  |NN const U8 *p
 ADMpR  |bool   |is_utf8_alnumc |NN const U8 *p
 ADMpR  |bool   |is_utf8_idfirst|NN const U8 *p
 ADMpR  |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
+AMpR   |bool   |_is_utf8_xidstart|NN const U8 *p
 AMpR   |bool   |_is_utf8_perl_idcont|NN const U8 *p
 AMpR   |bool   |_is_utf8_perl_idstart|NN const U8 *p
 ADMpR  |bool   |is_utf8_idcont |NN const U8 *p
diff --git a/embed.h b/embed.h
index 4a3dbbd..ca9983d 100644
--- a/embed.h
+++ b/embed.h
@@ -31,9 +31,13 @@
 #define _is_uni_perl_idcont(a) Perl__is_uni_perl_idcont(aTHX_ a)
 #define _is_uni_perl_idstart(a)        Perl__is_uni_perl_idstart(aTHX_ a)
 #define _is_utf8_FOO(a,b)      Perl__is_utf8_FOO(aTHX_ a,b)
+#define _is_utf8_idcont(a)     Perl__is_utf8_idcont(aTHX_ a)
+#define _is_utf8_idstart(a)    Perl__is_utf8_idstart(aTHX_ a)
 #define _is_utf8_mark(a)       Perl__is_utf8_mark(aTHX_ a)
 #define _is_utf8_perl_idcont(a)        Perl__is_utf8_perl_idcont(aTHX_ a)
 #define _is_utf8_perl_idstart(a)       Perl__is_utf8_perl_idstart(aTHX_ a)
+#define _is_utf8_xidcont(a)    Perl__is_utf8_xidcont(aTHX_ a)
+#define _is_utf8_xidstart(a)   Perl__is_utf8_xidstart(aTHX_ a)
 #define _to_uni_fold_flags(a,b,c,d)    Perl__to_uni_fold_flags(aTHX_ a,b,c,d)
 #define _to_utf8_fold_flags(a,b,c,d)   Perl__to_utf8_fold_flags(aTHX_ a,b,c,d)
 #define _to_utf8_lower_flags(a,b,c,d)  Perl__to_utf8_lower_flags(aTHX_ a,b,c,d)
@@ -229,6 +233,8 @@
 #define init_stacks()          Perl_init_stacks(aTHX)
 #define init_tm(a)             Perl_init_tm(aTHX_ a)
 #define instr                  Perl_instr
+#define isALNUM_lazy(a)                Perl_isALNUM_lazy(aTHX_ a)
+#define isIDFIRST_lazy(a)      Perl_isIDFIRST_lazy(aTHX_ a)
 #define is_ascii_string                Perl_is_ascii_string
 #define is_lvalue_sub()                Perl_is_lvalue_sub(aTHX)
 #define is_safe_syscall(a,b,c,d)       S_is_safe_syscall(aTHX_ a,b,c,d)
@@ -1138,8 +1144,6 @@
 #define intro_my()             Perl_intro_my(aTHX)
 #define invert(a)              Perl_invert(aTHX_ a)
 #define io_close(a,b)          Perl_io_close(aTHX_ a,b)
-#define isALNUM_lazy(a)                S_isALNUM_lazy(aTHX_ a)
-#define isIDFIRST_lazy(a)      S_isIDFIRST_lazy(aTHX_ a)
 #define jmaybe(a)              Perl_jmaybe(aTHX_ a)
 #define keyword(a,b,c)         Perl_keyword(aTHX_ a,b,c)
 #define list(a)                        Perl_list(aTHX_ a)
diff --git a/inline.h b/inline.h
index fff7499..dd0eae6 100644
--- a/inline.h
+++ b/inline.h
@@ -219,33 +219,17 @@ S_append_utf8_from_native_byte(const U8 byte, U8** dest)
     }
 }
 
-/* These two exist only to replace the macros they formerly were so that their
- * use can be deprecated */
-
-PERL_STATIC_INLINE bool
-S_isIDFIRST_lazy(pTHX_ const char* p)
-{
-    PERL_ARGS_ASSERT_ISIDFIRST_LAZY;
-
-    return isIDFIRST_lazy_if(p,1);
-}
-
-PERL_STATIC_INLINE bool
-S_isALNUM_lazy(pTHX_ const char* p)
-{
-    PERL_ARGS_ASSERT_ISALNUM_LAZY;
-
-    return isALNUM_lazy_if(p,1);
-}
-
 /*
+
 A helper function for the macro isUTF8_CHAR(), which should be used instead of
 this function.  The macro will handle smaller code points directly saving time,
 using this function as a fall-back for higher code points.
+
 Tests if the first bytes of string C<s> form a valid UTF-8 character.  0 is
 returned if the bytes starting at C<s> up to but not including C<e> do not 
form a
 complete well-formed UTF-8 character; otherwise the number of bytes in the
 character is returned.
+
 Note that an INVARIANT (i.e. ASCII on non-EBCDIC) character is a valid UTF-8
 character.
 
diff --git a/mathoms.c b/mathoms.c
index 1132ac8..732e2a4 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -1233,6 +1233,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)
 {
@@ -1368,6 +1384,54 @@ Perl_is_uni_digit_lc(pTHX_ UV c)
 }
 
 bool
+Perl_is_uni_idfirst(pTHX_ UV c)
+{
+    U8 tmpbuf[UTF8_MAXBYTES+1];
+    uvchr_to_utf8(tmpbuf, c);
+    return _is_utf8_idstart(tmpbuf);
+}
+
+bool
+Perl_is_utf8_idfirst(pTHX_ const U8 *p) /* The naming is historical. */
+{
+    dVAR;
+
+    PERL_ARGS_ASSERT_IS_UTF8_IDFIRST;
+
+    return _is_utf8_idstart(p);
+}
+
+bool
+Perl_is_utf8_xidfirst(pTHX_ const U8 *p) /* The naming is historical. */
+{
+    dVAR;
+
+    PERL_ARGS_ASSERT_IS_UTF8_XIDFIRST;
+
+    return _is_utf8_xidstart(p);
+}
+
+bool
+Perl_is_utf8_idcont(pTHX_ const U8 *p)
+{
+    dVAR;
+
+    PERL_ARGS_ASSERT_IS_UTF8_IDCONT;
+
+    return _is_utf8_idcont(p);
+}
+
+bool
+Perl_is_utf8_xidcont(pTHX_ const U8 *p)
+{
+    dVAR;
+
+    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);
@@ -1628,6 +1692,104 @@ Perl_is_utf8_mark(pTHX_ const U8 *p)
     return _is_utf8_mark(p);
 }
 
+/*
+=for apidoc is_utf8_char
+
+Tests if some arbitrary number of bytes begins in a valid UTF-8
+character.  Note that an INVARIANT (i.e. ASCII on non-EBCDIC machines)
+character is a valid UTF-8 character.  The actual number of bytes in the UTF-8
+character will be returned if it is valid, otherwise 0.
+
+This function is deprecated due to the possibility that malformed input could
+cause reading beyond the end of the input buffer.  Use L</isUTF8_CHAR>
+instead.
+
+=cut */
+
+STRLEN
+Perl_is_utf8_char(const U8 *s)
+{
+    PERL_ARGS_ASSERT_IS_UTF8_CHAR;
+
+    /* Assumes we have enough space, which is why this is deprecated */
+    return isUTF8_CHAR(s, s + UTF8SKIP(s));
+}
+
+/* DEPRECATED!
+ * Like L</utf8_to_uvuni_buf>(), but should only be called when it is known 
that
+ * there are no malformations in the input UTF-8 string C<s>.  Surrogates,
+ * non-character code points, and non-Unicode code points are allowed */
+
+UV
+Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
+{
+    PERL_ARGS_ASSERT_VALID_UTF8_TO_UVUNI;
+
+    return NATIVE_TO_UNI(valid_utf8_to_uvchr(s, retlen));
+}
+
+/*
+=for apidoc utf8_to_uvchr
+
+Returns the native code point of the first character in the string C<s>
+which is assumed to be in UTF-8 encoding; C<retlen> will be set to the
+length, in bytes, of that character.
+
+Some, but not all, UTF-8 malformations are detected, and in fact, some
+malformed input could cause reading beyond the end of the input buffer, which
+is why this function is deprecated.  Use L</utf8_to_uvchr_buf> instead.
+
+If C<s> points to one of the detected malformations, and UTF8 warnings are
+enabled, zero is returned and C<*retlen> is set (if C<retlen> isn't
+NULL) to -1.  If those warnings are off, the computed value if well-defined (or
+the Unicode REPLACEMENT CHARACTER, if not) is silently returned, and C<*retlen>
+is set (if C<retlen> isn't NULL) so that (S<C<s> + C<*retlen>>) is the
+next possible position in C<s> that could begin a non-malformed character.
+See L</utf8n_to_uvchr> for details on when the REPLACEMENT CHARACTER is 
returned.
+
+=cut
+*/
+
+UV
+Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
+{
+    PERL_ARGS_ASSERT_UTF8_TO_UVCHR;
+
+    return utf8_to_uvchr_buf(s, s + UTF8_MAXBYTES, retlen);
+}
+
+/*
+=for apidoc utf8_to_uvuni
+
+Returns the Unicode code point of the first character in the string C<s>
+which is assumed to be in UTF-8 encoding; C<retlen> will be set to the
+length, in bytes, of that character.
+
+Some, but not all, UTF-8 malformations are detected, and in fact, some
+malformed input could cause reading beyond the end of the input buffer, which
+is one reason why this function is deprecated.  The other is that only in
+extremely limited circumstances should the Unicode versus native code point be
+of any interest to you.  See L</utf8_to_uvuni_buf> for alternatives.
+
+If C<s> points to one of the detected malformations, and UTF8 warnings are
+enabled, zero is returned and C<*retlen> is set (if C<retlen> doesn't point to
+NULL) to -1.  If those warnings are off, the computed value if well-defined (or
+the Unicode REPLACEMENT CHARACTER, if not) is silently returned, and C<*retlen>
+is set (if C<retlen> isn't NULL) so that (S<C<s> + C<*retlen>>) is the
+next possible position in C<s> that could begin a non-malformed character.
+See L</utf8n_to_uvchr> for details on when the REPLACEMENT CHARACTER is 
returned.
+
+=cut
+*/
+
+UV
+Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
+{
+    PERL_ARGS_ASSERT_UTF8_TO_UVUNI;
+
+    return NATIVE_TO_UNI(valid_utf8_to_uvchr(s, retlen));
+}
+
 END_EXTERN_C
 
 #endif /* NO_MATHOMS */
diff --git a/proto.h b/proto.h
index e5b7478..70cf3de 100644
--- a/proto.h
+++ b/proto.h
@@ -64,6 +64,18 @@ PERL_STATIC_INLINE STRLEN    S__is_utf8_char_slow(const U8 
*s, const U8 *e)
 #define PERL_ARGS_ASSERT__IS_UTF8_CHAR_SLOW    \
        assert(s); assert(e)
 
+PERL_CALLCONV bool     Perl__is_utf8_idcont(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__IS_UTF8_IDCONT       \
+       assert(p)
+
+PERL_CALLCONV bool     Perl__is_utf8_idstart(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__IS_UTF8_IDSTART      \
+       assert(p)
+
 PERL_CALLCONV bool     Perl__is_utf8_mark(pTHX_ const U8 *p)
                        __attribute__warn_unused_result__
                        __attribute__nonnull__(pTHX_1);
@@ -82,6 +94,18 @@ PERL_CALLCONV bool   Perl__is_utf8_perl_idstart(pTHX_ const 
U8 *p)
 #define PERL_ARGS_ASSERT__IS_UTF8_PERL_IDSTART \
        assert(p)
 
+PERL_CALLCONV bool     Perl__is_utf8_xidcont(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__IS_UTF8_XIDCONT      \
+       assert(p)
+
+PERL_CALLCONV bool     Perl__is_utf8_xidstart(pTHX_ const U8 *p)
+                       __attribute__warn_unused_result__
+                       __attribute__nonnull__(pTHX_1);
+#define PERL_ARGS_ASSERT__IS_UTF8_XIDSTART     \
+       assert(p)
+
 PERL_CALLCONV UV       Perl__to_uni_fold_flags(pTHX_ UV c, U8 *p, STRLEN 
*lenp, U8 flags)
                        __attribute__nonnull__(pTHX_2)
                        __attribute__nonnull__(pTHX_3);
@@ -1769,7 +1793,7 @@ PERL_CALLCONV bool        Perl_io_close(pTHX_ IO* io, 
bool not_implicit)
 #define PERL_ARGS_ASSERT_IO_CLOSE      \
        assert(io)
 
-PERL_STATIC_INLINE bool        S_isALNUM_lazy(pTHX_ const char* p)
+PERL_CALLCONV bool     Perl_isALNUM_lazy(pTHX_ const char* p)
                        __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__
@@ -1777,7 +1801,7 @@ PERL_STATIC_INLINE bool   S_isALNUM_lazy(pTHX_ const 
char* p)
 #define PERL_ARGS_ASSERT_ISALNUM_LAZY  \
        assert(p)
 
-PERL_STATIC_INLINE bool        S_isIDFIRST_lazy(pTHX_ const char* p)
+PERL_CALLCONV bool     Perl_isIDFIRST_lazy(pTHX_ const char* p)
                        __attribute__deprecated__
                        __attribute__warn_unused_result__
                        __attribute__pure__
diff --git a/utf8.c b/utf8.c
index 1b684f2..f4e9a57 100644
--- a/utf8.c
+++ b/utf8.c
@@ -324,30 +324,6 @@ Perl_is_utf8_char_buf(const U8 *buf, const U8* buf_end)
 }
 
 /*
-=for apidoc is_utf8_char
-
-Tests if some arbitrary number of bytes begins in a valid UTF-8
-character.  Note that an INVARIANT (i.e. ASCII on non-EBCDIC machines)
-character is a valid UTF-8 character.  The actual number of bytes in the UTF-8
-character will be returned if it is valid, otherwise 0.
-
-This function is deprecated due to the possibility that malformed input could
-cause reading beyond the end of the input buffer.  Use L</is_utf8_char_buf>
-instead.
-
-=cut */
-
-STRLEN
-Perl_is_utf8_char(const U8 *s)
-{
-    PERL_ARGS_ASSERT_IS_UTF8_CHAR;
-
-    /* Assumes we have enough space, which is why this is deprecated */
-    return isUTF8_CHAR(s, s + UTF8SKIP(s));
-}
-
-
-/*
 =for apidoc is_utf8_string
 
 Returns true if the first C<len> bytes of string C<s> form a valid
@@ -924,36 +900,6 @@ Perl_valid_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
 }
 
 /*
-=for apidoc utf8_to_uvchr
-
-Returns the native code point of the first character in the string C<s>
-which is assumed to be in UTF-8 encoding; C<retlen> will be set to the
-length, in bytes, of that character.
-
-Some, but not all, UTF-8 malformations are detected, and in fact, some
-malformed input could cause reading beyond the end of the input buffer, which
-is why this function is deprecated.  Use L</utf8_to_uvchr_buf> instead.
-
-If C<s> points to one of the detected malformations, and UTF8 warnings are
-enabled, zero is returned and C<*retlen> is set (if C<retlen> isn't
-NULL) to -1.  If those warnings are off, the computed value if well-defined (or
-the Unicode REPLACEMENT CHARACTER, if not) is silently returned, and C<*retlen>
-is set (if C<retlen> isn't NULL) so that (S<C<s> + C<*retlen>>) is the
-next possible position in C<s> that could begin a non-malformed character.
-See L</utf8n_to_uvchr> for details on when the REPLACEMENT CHARACTER is 
returned.
-
-=cut
-*/
-
-UV
-Perl_utf8_to_uvchr(pTHX_ const U8 *s, STRLEN *retlen)
-{
-    PERL_ARGS_ASSERT_UTF8_TO_UVCHR;
-
-    return utf8_to_uvchr_buf(s, s + UTF8_MAXBYTES, retlen);
-}
-
-/*
 =for apidoc utf8_to_uvuni_buf
 
 Only in very rare circumstances should code need to be dealing in Unicode
@@ -988,51 +934,6 @@ Perl_utf8_to_uvuni_buf(pTHX_ const U8 *s, const U8 *send, 
STRLEN *retlen)
                               ckWARN_d(WARN_UTF8) ? 0 : UTF8_ALLOW_ANY));
 }
 
-/* DEPRECATED!
- * Like L</utf8_to_uvuni_buf>(), but should only be called when it is known 
that
- * there are no malformations in the input UTF-8 string C<s>.  Surrogates,
- * non-character code points, and non-Unicode code points are allowed */
-
-UV
-Perl_valid_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
-{
-    PERL_ARGS_ASSERT_VALID_UTF8_TO_UVUNI;
-
-    return NATIVE_TO_UNI(valid_utf8_to_uvchr(s, retlen));
-}
-
-/*
-=for apidoc utf8_to_uvuni
-
-Returns the Unicode code point of the first character in the string C<s>
-which is assumed to be in UTF-8 encoding; C<retlen> will be set to the
-length, in bytes, of that character.
-
-Some, but not all, UTF-8 malformations are detected, and in fact, some
-malformed input could cause reading beyond the end of the input buffer, which
-is one reason why this function is deprecated.  The other is that only in
-extremely limited circumstances should the Unicode versus native code point be
-of any interest to you.  See L</utf8_to_uvuni_buf> for alternatives.
-
-If C<s> points to one of the detected malformations, and UTF8 warnings are
-enabled, zero is returned and C<*retlen> is set (if C<retlen> doesn't point to
-NULL) to -1.  If those warnings are off, the computed value if well-defined (or
-the Unicode REPLACEMENT CHARACTER, if not) is silently returned, and C<*retlen>
-is set (if C<retlen> isn't NULL) so that (S<C<s> + C<*retlen>>) is the
-next possible position in C<s> that could begin a non-malformed character.
-See L</utf8n_to_uvchr> for details on when the REPLACEMENT CHARACTER is 
returned.
-
-=cut
-*/
-
-UV
-Perl_utf8_to_uvuni(pTHX_ const U8 *s, STRLEN *retlen)
-{
-    PERL_ARGS_ASSERT_UTF8_TO_UVUNI;
-
-    return NATIVE_TO_UNI(valid_utf8_to_uvchr(s, retlen));
-}
-
 /*
 =for apidoc utf8_length
 
@@ -1456,26 +1357,18 @@ Perl__is_uni_FOO(pTHX_ const U8 classnum, const UV c)
 /* Internal function so we can deprecate the external one, and call
    this one from other deprecated functions in this file */
 
-PERL_STATIC_INLINE bool
-S_is_utf8_idfirst(pTHX_ const U8 *p)
+bool
+Perl__is_utf8_idstart(pTHX_ const U8 *p)
 {
     dVAR;
+    PERL_ARGS_ASSERT__IS_UTF8_IDSTART;
 
     if (*p == '_')
        return TRUE;
-    /* is_utf8_idstart would be more logical. */
     return is_utf8_common(p, &PL_utf8_idstart, "IdStart", NULL);
 }
 
 bool
-Perl_is_uni_idfirst(pTHX_ UV c)
-{
-    U8 tmpbuf[UTF8_MAXBYTES+1];
-    uvchr_to_utf8(tmpbuf, c);
-    return S_is_utf8_idfirst(aTHX_ tmpbuf);
-}
-
-bool
 Perl__is_uni_perl_idcont(pTHX_ UV c)
 {
     U8 tmpbuf[UTF8_MAXBYTES+1];
@@ -1799,43 +1692,32 @@ Perl__is_utf8_FOO(pTHX_ const U8 classnum, const U8 *p)
 }
 
 bool
-Perl_is_utf8_idfirst(pTHX_ const U8 *p) /* The naming is historical. */
+Perl__is_utf8_perl_idstart(pTHX_ const U8 *p)
 {
     dVAR;
+    SV* invlist = NULL;
 
-    PERL_ARGS_ASSERT_IS_UTF8_IDFIRST;
+    PERL_ARGS_ASSERT__IS_UTF8_PERL_IDSTART;
 
-    return S_is_utf8_idfirst(aTHX_ p);
+    if (! PL_utf8_perl_idstart) {
+        invlist = _new_invlist_C_array(_Perl_IDStart_invlist);
+    }
+    return is_utf8_common(p, &PL_utf8_perl_idstart, "", invlist);
 }
 
 bool
-Perl_is_utf8_xidfirst(pTHX_ const U8 *p) /* The naming is historical. */
+Perl__is_utf8_xidstart(pTHX_ const U8 *p)
 {
     dVAR;
 
-    PERL_ARGS_ASSERT_IS_UTF8_XIDFIRST;
+    PERL_ARGS_ASSERT__IS_UTF8_XIDSTART;
 
     if (*p == '_')
        return TRUE;
-    /* is_utf8_idstart would be more logical. */
     return is_utf8_common(p, &PL_utf8_xidstart, "XIdStart", NULL);
 }
 
 bool
-Perl__is_utf8_perl_idstart(pTHX_ const U8 *p)
-{
-    dVAR;
-    SV* invlist = NULL;
-
-    PERL_ARGS_ASSERT__IS_UTF8_PERL_IDSTART;
-
-    if (! PL_utf8_perl_idstart) {
-        invlist = _new_invlist_C_array(_Perl_IDStart_invlist);
-    }
-    return is_utf8_common(p, &PL_utf8_perl_idstart, "", invlist);
-}
-
-bool
 Perl__is_utf8_perl_idcont(pTHX_ const U8 *p)
 {
     dVAR;
@@ -1849,23 +1731,22 @@ Perl__is_utf8_perl_idcont(pTHX_ const U8 *p)
     return is_utf8_common(p, &PL_utf8_perl_idcont, "", invlist);
 }
 
-
 bool
-Perl_is_utf8_idcont(pTHX_ const U8 *p)
+Perl__is_utf8_idcont(pTHX_ const U8 *p)
 {
     dVAR;
 
-    PERL_ARGS_ASSERT_IS_UTF8_IDCONT;
+    PERL_ARGS_ASSERT__IS_UTF8_IDCONT;
 
     return is_utf8_common(p, &PL_utf8_idcont, "IdContinue", NULL);
 }
 
 bool
-Perl_is_utf8_xidcont(pTHX_ const U8 *p)
+Perl__is_utf8_xidcont(pTHX_ const U8 *p)
 {
     dVAR;
 
-    PERL_ARGS_ASSERT_IS_UTF8_XIDCONT;
+    PERL_ARGS_ASSERT__IS_UTF8_XIDCONT;
 
     return is_utf8_common(p, &PL_utf8_idcont, "XIdContinue", NULL);
 }
@@ -4250,7 +4131,7 @@ Perl_foldEQ_utf8_flags(pTHX_ const char *s1, char **pe1, 
UV l1, bool u1, const c
     return 1;
 }
 
-/* XXX The next four functions should likely be moved to mathoms.c once all
+/* XXX The next two functions should likely be moved to mathoms.c once all
  * occurrences of them are removed from the core; some cpan-upstream modules
  * still use them */
 

--
Perl5 Master Repository

Reply via email to