In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/d8c930858e7fb01bcab7473e573e007d2fb9ab12?hp=059703b088f44d5665f67fba0b9d80cad89085fd>

- Log -----------------------------------------------------------------
commit d8c930858e7fb01bcab7473e573e007d2fb9ab12
Author: Karl Williamson <[email protected]>
Date:   Mon Sep 30 17:47:21 2019 -0600

    mathoms: Restore fcns accidentally deleted
    
    Commit x059703b088f44d5665f67fba0b9d80cad89085fd removed more code than
    was intended.  This commit restores the missing functions.
    
    This showed up in MSWin32 builds, I presume VMS as well.
    
    Spotted by Tony Cook

commit f4d9f228e77d10715e571f11f545d89fdf09c53a
Author: Karl Williamson <[email protected]>
Date:   Mon Sep 30 21:50:09 2019 -0600

    regcomp.c: Fix MSWin32 compilation error
    
    On DEBUGGING builds, the asserts in the expansion of this macro build up
    too large of literal strings for the Win32 compiler.  Solve this by
    storing to an intermediary.

-----------------------------------------------------------------------

Summary of changes:
 mathoms.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 regcomp.c |  7 ++++++-
 2 files changed, 78 insertions(+), 1 deletion(-)

diff --git a/mathoms.c b/mathoms.c
index 8b6388b8a2..194c83f130 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -1336,6 +1336,78 @@ Perl_is_uni_idfirst(pTHX_ UV c)
     return _is_utf8_idstart(tmpbuf);
 }
 
+bool
+Perl_is_uni_upper_lc(pTHX_ UV c)
+{
+    return isUPPER_LC_uvchr(c);
+}
+
+bool
+Perl_is_uni_lower_lc(pTHX_ UV c)
+{
+    return isLOWER_LC_uvchr(c);
+}
+
+bool
+Perl_is_uni_cntrl_lc(pTHX_ UV c)
+{
+    return isCNTRL_LC_uvchr(c);
+}
+
+bool
+Perl_is_uni_graph_lc(pTHX_ UV c)
+{
+    return isGRAPH_LC_uvchr(c);
+}
+
+bool
+Perl_is_uni_print_lc(pTHX_ UV c)
+{
+    return isPRINT_LC_uvchr(c);
+}
+
+bool
+Perl_is_uni_punct_lc(pTHX_ UV c)
+{
+    return isPUNCT_LC_uvchr(c);
+}
+
+bool
+Perl_is_uni_xdigit_lc(pTHX_ UV c)
+{
+    return isXDIGIT_LC_uvchr(c);
+}
+
+U32
+Perl_to_uni_upper_lc(pTHX_ U32 c)
+{
+    /* XXX returns only the first character -- do not use XXX */
+    /* XXX no locale support yet */
+    STRLEN len;
+    U8 tmpbuf[UTF8_MAXBYTES_CASE+1];
+    return (U32)to_uni_upper(c, tmpbuf, &len);
+}
+
+U32
+Perl_to_uni_title_lc(pTHX_ U32 c)
+{
+    /* XXX returns only the first character XXX -- do not use XXX */
+    /* XXX no locale support yet */
+    STRLEN len;
+    U8 tmpbuf[UTF8_MAXBYTES_CASE+1];
+    return (U32)to_uni_title(c, tmpbuf, &len);
+}
+
+U32
+Perl_to_uni_lower_lc(pTHX_ U32 c)
+{
+    /* XXX returns only the first character -- do not use XXX */
+    /* XXX no locale support yet */
+    STRLEN len;
+    U8 tmpbuf[UTF8_MAXBYTES_CASE+1];
+    return (U32)to_uni_lower(c, tmpbuf, &len);
+}
+
 bool
 Perl_is_utf8_mark(pTHX_ const U8 *p)
 {
diff --git a/regcomp.c b/regcomp.c
index e8e4efb3d5..f007d90cf9 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -14902,6 +14902,11 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, 
U32 depth)
                     }
                     else if (node_type == EXACTF) {  /* Means is /di */
 
+                        /* This intermediate variable is needed solely because
+                         * the asserts in the macro where used exceed Win32's
+                         * literal string capacity */
+                        char first_char = * STRING(REGNODE_p(ret));
+
                         /* If 'maybe_exactfu' is clear, then we need to stay
                          * /di.  If it is set, it means there are no code
                          * points that match differently depending on UTF8ness
@@ -14910,7 +14915,7 @@ S_regatom(pTHX_ RExC_state_t *pRExC_state, I32 *flagp, 
U32 depth)
                         if (! maybe_exactfu) {
                             RExC_seen_d_op = TRUE;
                         }
-                        else if (   isALPHA_FOLD_EQ(* STRING(REGNODE_p(ret)), 
's')
+                        else if (   isALPHA_FOLD_EQ(first_char, 's')
                                  || isALPHA_FOLD_EQ(ender, 's'))
                         {
                             /* But, if the node begins or ends in an 's' we

-- 
Perl5 Master Repository

Reply via email to